From 1ec4b5a8ebfa022decac16026e9775450c58807a Mon Sep 17 00:00:00 2001 From: pconrad Date: Fri, 1 Aug 2025 08:51:17 +0200 Subject: [PATCH] Fix URL path handling to add trailing slash conditionally Ensure trailing slash is added only when the path does not contain a query string. This prevents incorrect URL formatting in specific cases involving query parameters. --- qfieldcloud_sdk/sdk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qfieldcloud_sdk/sdk.py b/qfieldcloud_sdk/sdk.py index 8b9d409..12952a6 100644 --- a/qfieldcloud_sdk/sdk.py +++ b/qfieldcloud_sdk/sdk.py @@ -1727,7 +1727,7 @@ def _request( if path.startswith("/"): path = path[1:] - if not path.endswith("/"): + if not path.endswith("/") and path.find("?") == -1: path += "/" path = self.url + path