From a6ead20e0a27d3d11aed8f863173fe33f38ed117 Mon Sep 17 00:00:00 2001 From: SimonSAMPERE Date: Wed, 3 Apr 2024 17:53:44 +0200 Subject: [PATCH] #258 Fix portal metadata URL generation (handling missing "/") --- modules/results/display.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/results/display.py b/modules/results/display.py index d913bf3d..66fc3fcf 100644 --- a/modules/results/display.py +++ b/modules/results/display.py @@ -699,7 +699,10 @@ def build_md_portal_url(self, metadata_id: str): portal_base_url = settings_mng.get_value("isogeo/settings/portal_base_url", "") if add_portal_md_url and portal_base_url != "": - portal_md_url = portal_base_url + metadata_id + if portal_base_url.endswith("/"): + portal_md_url = portal_base_url + metadata_id + else: + portal_md_url = portal_base_url + "/" + metadata_id else: portal_md_url = ""