diff options
author | Munyoki Kilyungi | 2024-04-30 10:58:29 +0300 |
---|---|---|
committer | BonfaceKilz | 2024-04-30 13:09:46 +0300 |
commit | 4ba0d9c26d8d5dd9e2ac690a5aa69468b5e01282 (patch) | |
tree | 17c115b3480aef342dce29dd711e3717aa16fc63 /gn2/wqflask | |
parent | ccc78d7683a9ef4f703430c3ec5bc68debe1e7cb (diff) | |
download | genenetwork2-4ba0d9c26d8d5dd9e2ac690a5aa69468b5e01282.tar.gz |
Use a dataset's label instead of it's id when fetching auth details.
* gn2/wqflask/views.py (get_dataset): Use a dataset's label as it's
identifier.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'gn2/wqflask')
-rw-r--r-- | gn2/wqflask/views.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gn2/wqflask/views.py b/gn2/wqflask/views.py index c126524b..eb741701 100644 --- a/gn2/wqflask/views.py +++ b/gn2/wqflask/views.py @@ -1223,9 +1223,8 @@ def get_dataset(name): GN3_LOCAL_URL, f"/api/metadata/datasets/{name}") ).json() - id_ = metadata.get("id", "").split("/")[-1] result = oauth2_get( - f"auth/resource/authorisation/{id_}" + f"auth/resource/authorisation/{metadata.get('label')}" ).either( lambda err: {"roles": []}, lambda val: val |