From b79280c69f3b18475cf7b3052b37a991303fac9d Mon Sep 17 00:00:00 2001 From: Toni Date: Fri, 24 Mar 2023 07:50:44 +0100 Subject: [PATCH 1/2] [Fixes: #259] Loading of dataset fails if domain contains geoserver --- src/qgis_geonode/apiclient/geonode_v3.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qgis_geonode/apiclient/geonode_v3.py b/src/qgis_geonode/apiclient/geonode_v3.py index 0acc7b7a..9742aee3 100644 --- a/src/qgis_geonode/apiclient/geonode_v3.py +++ b/src/qgis_geonode/apiclient/geonode_v3.py @@ -358,9 +358,9 @@ def _get_service_urls( if auth_provider_name == "basic": for service_type, retrieved_url in result.items(): try: - prefix, suffix = retrieved_url.partition("geoserver")[::2] - result[service_type] = f"{self.base_url}/gs{suffix}" - log(f"result[service_type]: {self.base_url}/gs{suffix}") + prefix, suffix = retrieved_url.partition("/geoserver/")[::2] + result[service_type] = f"{self.base_url}/gs/{suffix}" + log(f"result[service_type]: ABC {self.base_url}/gs/{suffix}") except AttributeError: pass return result From b37fac44242fff04fb0efc7ba51588628cf5fc49 Mon Sep 17 00:00:00 2001 From: Toni Date: Sun, 2 Apr 2023 08:42:52 +0200 Subject: [PATCH 2/2] fix log --- src/qgis_geonode/apiclient/geonode_v3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qgis_geonode/apiclient/geonode_v3.py b/src/qgis_geonode/apiclient/geonode_v3.py index 9742aee3..1fa211b1 100644 --- a/src/qgis_geonode/apiclient/geonode_v3.py +++ b/src/qgis_geonode/apiclient/geonode_v3.py @@ -360,7 +360,7 @@ def _get_service_urls( try: prefix, suffix = retrieved_url.partition("/geoserver/")[::2] result[service_type] = f"{self.base_url}/gs/{suffix}" - log(f"result[service_type]: ABC {self.base_url}/gs/{suffix}") + log(f"result[service_type]: {self.base_url}/gs/{suffix}") except AttributeError: pass return result