From 9671e9ef4bc20d562b831f97c52b40e91b1d4c20 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 843ed07a..a7bc8fa2 100644 --- a/gn2/wqflask/views.py +++ b/gn2/wqflask/views.py @@ -1230,8 +1230,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 From dc1485253ef4b9a4c2c1af45a56eff4018bc6d07 Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Mon, 20 May 2024 12:56:03 +0300 Subject: Remove styling for search field. Signed-off-by: Munyoki Kilyungi --- gn2/wqflask/templates/dataset.html | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) (limited to 'gn2/wqflask') diff --git a/gn2/wqflask/templates/dataset.html b/gn2/wqflask/templates/dataset.html index 096a3724..62fac650 100644 --- a/gn2/wqflask/templates/dataset.html +++ b/gn2/wqflask/templates/dataset.html @@ -40,31 +40,6 @@ .panel-metadata dt::after { content: ":"; } - - .search { - width: 50%; - margin: 1em auto; - } - .has-search .form-control-feedback { - right: initial; - left: 0; - color: #ccc; - } - - .has-search .form-control { - padding-right: 12px; - padding-left: 34px; - } - - .search { - transform: scale(1.5, 1.5); - } - .search input { - min-width: 17em; - } - .dataset-search { - padding: 0 17%; - } {% endblock %} @@ -348,7 +323,7 @@ {% else %} -