aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2020-10-23 15:16:22 -0500
committerGitHub2020-10-23 15:16:22 -0500
commite9f76dfd0f9f57be54d018af27de6a349ebaf08f (patch)
tree3ab32339ad8ad7f66d868bdefa0c367748cb3760 /wqflask
parent68a0ddfd07a4235187b79a519c1f546cf792ab06 (diff)
parenta4a84206853a46e98ddc3455d6c5f0ea470e8afc (diff)
downloadgenenetwork2-e9f76dfd0f9f57be54d018af27de6a349ebaf08f.tar.gz
Merge pull request #462 from zsloan/fix_export_error
Fixed trait export for situations where there's no authors/title/journal
Diffstat (limited to 'wqflask')
-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([])