From ee2de41747b20d7651dd0c3d002972dd18162e75 Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Wed, 14 Feb 2024 08:55:39 +0300 Subject: Stem the dataset's id before constructing the path. Signed-off-by: Munyoki Kilyungi --- gn3/api/metadata.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gn3/api/metadata.py b/gn3/api/metadata.py index 096702e..eb42be4 100644 --- a/gn3/api/metadata.py +++ b/gn3/api/metadata.py @@ -203,7 +203,8 @@ CONSTRUCT { return __result | retrieve_dataset_metadata( (Path( current_app.config.get("DATA_DIR") - ) / "gn-docs/general/datasets" / __result.get("id", "")).as_posix() + ) / "gn-docs/general/datasets" / + Path(__result.get("id", "")).stem).as_posix() ) except (RemoteDisconnected, URLError): return jsonify({}) -- cgit v1.2.3