diff options
author | Munyoki Kilyungi | 2024-05-20 12:55:52 +0300 |
---|---|---|
committer | BonfaceKilz | 2024-05-20 13:01:12 +0300 |
commit | 4af6200d0c0d8f6872e2224cc317f6a09b9d1663 (patch) | |
tree | d12f0a5a81305e2560eda55bb1da847641738edc | |
parent | 8a4ab36a4691db03f731f918b7c4e6ff859157ee (diff) | |
download | genenetwork2-4af6200d0c0d8f6872e2224cc317f6a09b9d1663.tar.gz |
Check metadata exists before setting 'editable' field in get_dataset.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
-rw-r--r-- | gn2/wqflask/views.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gn2/wqflask/views.py b/gn2/wqflask/views.py index 9f403ace..3156e07c 100644 --- a/gn2/wqflask/views.py +++ b/gn2/wqflask/views.py @@ -1234,8 +1234,8 @@ def get_dataset(name): lambda err: {"roles": []}, lambda val: val ) - - metadata["editable"] = "group:resource:edit-resource" in result["roles"] + if metadata: + metadata["editable"] = "group:resource:edit-resource" in result["roles"] return render_template( "dataset.html", name=name, |