aboutsummaryrefslogtreecommitdiff
path: root/gn2
diff options
context:
space:
mode:
authorMunyoki Kilyungi2024-05-20 12:55:52 +0300
committerBonfaceKilz2024-05-20 13:01:12 +0300
commit4af6200d0c0d8f6872e2224cc317f6a09b9d1663 (patch)
treed12f0a5a81305e2560eda55bb1da847641738edc /gn2
parent8a4ab36a4691db03f731f918b7c4e6ff859157ee (diff)
downloadgenenetwork2-4af6200d0c0d8f6872e2224cc317f6a09b9d1663.tar.gz
Check metadata exists before setting 'editable' field in get_dataset.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'gn2')
-rw-r--r--gn2/wqflask/views.py4
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,