From c77b3bb9bef61ab75097f02b235081514302d36f Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Thu, 31 Mar 2022 15:24:01 +0300 Subject: Pass missing "conn" when getting case attributes * wqflask/wqflask/metadata_edits.py (show_case_attribute_columns): Create a connection and pass it to "get_case_attributes". --- wqflask/wqflask/metadata_edits.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wqflask/wqflask/metadata_edits.py b/wqflask/wqflask/metadata_edits.py index 604a1b10..ec6c9e7a 100644 --- a/wqflask/wqflask/metadata_edits.py +++ b/wqflask/wqflask/metadata_edits.py @@ -685,7 +685,10 @@ def approve_data(resource_id: str, file_name: str): @metadata_edit.route("/case-attributes") def show_case_attribute_columns(): - case_attributes = get_case_attributes() + case_attributes = {} + with database_connection() as conn: + case_attributes = get_case_attributes(conn) + for key, val in case_attributes.items(): if not val: case_attributes[key] = "No description" -- cgit v1.2.3