aboutsummaryrefslogtreecommitdiff
path: root/uploader/phenotypes
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2025-01-23 14:48:29 -0600
committerFrederick Muriuki Muriithi2025-01-23 14:48:29 -0600
commit7b626ecd21699bd809643aefeea7a075a96a4e66 (patch)
tree6b4f800e6d7d096893f14374d7dcaecba0f62943 /uploader/phenotypes
parentaf3894def4696ce6d61e1354a9b9f1431b161302 (diff)
downloadgn-uploader-7b626ecd21699bd809643aefeea7a075a96a4e66.tar.gz
Only present SE and N columns if at least one row has them.
Diffstat (limited to 'uploader/phenotypes')
-rw-r--r--uploader/phenotypes/views.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/uploader/phenotypes/views.py b/uploader/phenotypes/views.py
index 53e68d1..9c5c71a 100644
--- a/uploader/phenotypes/views.py
+++ b/uploader/phenotypes/views.py
@@ -220,16 +220,18 @@ def view_phenotype(# pylint: disable=[unused-argument]
):
"""View an individual phenotype from the dataset."""
def __render__(privileges):
+ phenotype = phenotype_by_id(conn,
+ species["SpeciesId"],
+ population["Id"],
+ dataset["Id"],
+ xref_id)
return render_template(
"phenotypes/view-phenotype.html",
species=species,
population=population,
dataset=dataset,
- phenotype=phenotype_by_id(conn,
- species["SpeciesId"],
- population["Id"],
- dataset["Id"],
- xref_id),
+ phenotype=phenotype,
+ has_se=all(bool(item.get("error")) for item in phenotype["data"]),
privileges=(privileges
### For demo! Do not commit this part
+ ("group:resource:edit-resource",