diff options
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/metadata_edits.py | 10 | ||||
-rw-r--r-- | wqflask/wqflask/templates/case_attributes.html | 6 |
2 files changed, 6 insertions, 10 deletions
diff --git a/wqflask/wqflask/metadata_edits.py b/wqflask/wqflask/metadata_edits.py index 00e289eb..279e63ac 100644 --- a/wqflask/wqflask/metadata_edits.py +++ b/wqflask/wqflask/metadata_edits.py @@ -701,10 +701,6 @@ def approve_data(resource_id: str, file_name: str): def show_case_attribute_columns(): 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" - return render_template( - "case_attributes.html", case_attributes=case_attributes - ) + return render_template( + "case_attributes.html", case_attributes=get_case_attributes(conn) + ) diff --git a/wqflask/wqflask/templates/case_attributes.html b/wqflask/wqflask/templates/case_attributes.html index 333b9cc4..48efd8c8 100644 --- a/wqflask/wqflask/templates/case_attributes.html +++ b/wqflask/wqflask/templates/case_attributes.html @@ -101,10 +101,10 @@ <th scope="col">Actions</th> </thead> <tbody> - {% for key, value in case_attributes.items() %} + {% for id_, name, description in case_attributes %} <tr> - <td>{{ key }}</td> - <td>{{ value }}</td> + <td>{{ name }}</td> + <td>{{description}}</td> <td> <a class="add" title="Add" data-toggle="tooltip"><i><span class="glyphicon glyphicon-plus" aria-hidden="true"></span></i></a> <a class="edit" title="Edit" data-toggle="tooltip"><i><span class="glyphicon glyphicon-edit" aria-hidden="true"></span></i></a> |