From 4af6200d0c0d8f6872e2224cc317f6a09b9d1663 Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Mon, 20 May 2024 12:55:52 +0300 Subject: Check metadata exists before setting 'editable' field in get_dataset. Signed-off-by: Munyoki Kilyungi --- gn2/wqflask/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gn2/wqflask') 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, -- cgit v1.2.3