aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2020-10-23 15:13:24 -0500
committerzsloan2020-10-23 15:13:24 -0500
commita4a84206853a46e98ddc3455d6c5f0ea470e8afc (patch)
treeaeb0d31dfda65e07da6f0c55ed546dfd86418c80
parentd62aba83dc8556676355d7647b0244bd18b505d8 (diff)
downloadgenenetwork2-a4a84206853a46e98ddc3455d6c5f0ea470e8afc.tar.gz
Fixed trait export for situations where there's no authors/title/journal
-rw-r--r--wqflask/wqflask/show_trait/export_trait_data.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/wqflask/wqflask/show_trait/export_trait_data.py b/wqflask/wqflask/show_trait/export_trait_data.py
index 253c887b..a32e437b 100644
--- a/wqflask/wqflask/show_trait/export_trait_data.py
+++ b/wqflask/wqflask/show_trait/export_trait_data.py
@@ -37,9 +37,9 @@ def get_export_metadata(trait_id, dataset_name):
metadata.append(["Phenotype URL: " + "http://genenetwork.org/show_trait?trait_id=" + trait_id + "&dataset=" + dataset_name])
metadata.append(["Group: " + dataset.group.name])
metadata.append(["Phenotype: " + this_trait.description_display.replace(",", "\",\"")])
- metadata.append(["Authors: " + this_trait.authors])
- metadata.append(["Title: " + this_trait.title])
- metadata.append(["Journal: " + this_trait.journal])
+ metadata.append(["Authors: " + (this_trait.authors if this_trait.authors else "N/A")])
+ metadata.append(["Title: " + (this_trait.title if this_trait.title else "N/A")])
+ metadata.append(["Journal: " + (this_trait.journal if this_trait.journal else "N/A")])
metadata.append(["Dataset Link: http://gn1.genenetwork.org/webqtl/main.py?FormID=sharinginfo&InfoPageName=" + dataset.name])
metadata.append([])