From 16eb010ebc3050c2de2d770c24bb84433063c486 Mon Sep 17 00:00:00 2001 From: Corentin Forler Date: Fri, 29 Nov 2024 16:47:44 +0100 Subject: [PATCH] fix(RemoteFrappeSite): Make method more robust --- press/utils/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/press/utils/__init__.py b/press/utils/__init__.py index a27a249cf7..1c20780a45 100644 --- a/press/utils/__init__.py +++ b/press/utils/__init__.py @@ -339,7 +339,8 @@ def _validate_frappe_site(self): frappe.throw("Invalid Frappe Site") if res.json().get("message") == "pong": - url = res.url.split("/api")[0] + # Get final redirect URL + url = res.url.split("/api/method")[0] self._site = url def _validate_user_permissions(self):