From a0e0e2dfc87d104de20a05e620a86b1df7d09e9a Mon Sep 17 00:00:00 2001 From: akhil-vamshi-konam Date: Thu, 28 May 2026 15:55:52 +0530 Subject: [PATCH] fix: normalize base path and endpoint strings to prevent redundant or missing slashes in URL construction --- plane/api/base_resource.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plane/api/base_resource.py b/plane/api/base_resource.py index 74de0c6..bd8bb4a 100644 --- a/plane/api/base_resource.py +++ b/plane/api/base_resource.py @@ -68,8 +68,8 @@ def _delete(self, endpoint: str, data: Mapping[str, Any] | None = None) -> None: # Helpers def _build_url(self, endpoint: str) -> str: - endpoint = endpoint.lstrip("/") - base = f"{self.config.base_path}{self.base_path}/" + endpoint = endpoint.strip("/") + base = f"{self.config.base_path.rstrip('/')}{self.base_path}/" return f"{base}{endpoint}/" if endpoint else base def _headers(self) -> dict[str, str]: