about summary refs log tree commit diff
path: root/uploader/phenotypes
diff options
context:
space:
mode:
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",