Fixed the logic in the __set_next method in the "accounting.utils.next_url" module.

This commit is contained in:
依瑪貓 2023-02-20 08:17:31 +08:00
parent 36b0bb3a0e
commit 330a71ebf2

View File

@ -68,7 +68,7 @@ def __set_next(uri: str, next_uri: str) -> str:
"""
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] != "next"]
params.append(("next", next_uri))
parts: list[str] = list(uri_p)
parts[4] = urlencode(params)