diff options
author | BonfaceKilz | 2022-05-11 11:39:04 +0300 |
---|---|---|
committer | BonfaceKilz | 2022-05-27 15:17:52 +0300 |
commit | b02c7767367868b80101633eadbd806aa525c2af (patch) | |
tree | 25a41c21925da3f4f5b5d4a4f5cea5c07f783e1f /wqflask | |
parent | 64f28e18097ca5aaee4446f02d036b375fecab6b (diff) | |
download | genenetwork2-b02c7767367868b80101633eadbd806aa525c2af.tar.gz |
Parse case attributes as a tuple, not as a dict
*
wqflask/wqflask/metadata_edits.py (approve_data):
Return the fetched case_attributes as is.
* wqflask/wqflask/templates/case_attributes.html:
Parse the case attributes as a tuple.
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> |