aboutsummaryrefslogtreecommitdiff
path: root/gn3
diff options
context:
space:
mode:
authorMunyoki Kilyungi2024-02-14 08:55:39 +0300
committerMunyoki Kilyungi2024-02-14 08:55:39 +0300
commitee2de41747b20d7651dd0c3d002972dd18162e75 (patch)
tree4dc05611889deff4022831770ca0b0e717b272d9 /gn3
parent69c1fa0f2a3e4789bc59e648d4caf69d6defe028 (diff)
downloadgenenetwork3-ee2de41747b20d7651dd0c3d002972dd18162e75.tar.gz
Stem the dataset's id before constructing the path.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'gn3')
-rw-r--r--gn3/api/metadata.py3
1 files changed, 2 insertions, 1 deletions
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({})