From 330a71ebf222fd4de53e7a72e2c225f2235a0ec8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Mon, 20 Feb 2023 08:17:31 +0800 Subject: [PATCH] Fixed the logic in the __set_next method in the "accounting.utils.next_url" module. --- src/accounting/utils/next_url.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/accounting/utils/next_url.py b/src/accounting/utils/next_url.py index d2cffaa..99b2e4e 100644 --- a/src/accounting/utils/next_url.py +++ b/src/accounting/utils/next_url.py @@ -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)