Fixed an error to recognize the current transaction type in the supplied URI in the with_type filter in the "accounting.transaction.template" module.

This commit is contained in:
依瑪貓 2023-02-27 18:47:19 +08:00
parent fd36672877
commit 4c17310ebf

View File

@ -40,7 +40,7 @@ def with_type(uri: str) -> str:
return uri
uri_p: ParseResult = urlparse(uri)
params: list[tuple[str, str]] = parse_qsl(uri_p.query)
params = [x for x in params if x[0] != "next"]
params = [x for x in params if x[0] != "as"]
params.append(("as", request.args["as"]))
parts: list[str] = list(uri_p)
parts[4] = urlencode(params)