diff options
author | Munyoki Kilyungi | 2024-02-14 08:55:39 +0300 |
---|---|---|
committer | Munyoki Kilyungi | 2024-02-14 08:55:39 +0300 |
commit | ee2de41747b20d7651dd0c3d002972dd18162e75 (patch) | |
tree | 4dc05611889deff4022831770ca0b0e717b272d9 | |
parent | 69c1fa0f2a3e4789bc59e648d4caf69d6defe028 (diff) | |
download | genenetwork3-ee2de41747b20d7651dd0c3d002972dd18162e75.tar.gz |
Stem the dataset's id before constructing the path.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
-rw-r--r-- | gn3/api/metadata.py | 3 |
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({}) |