diff options
author | zsloan | 2020-10-23 15:16:22 -0500 |
---|---|---|
committer | GitHub | 2020-10-23 15:16:22 -0500 |
commit | e9f76dfd0f9f57be54d018af27de6a349ebaf08f (patch) | |
tree | 3ab32339ad8ad7f66d868bdefa0c367748cb3760 /wqflask | |
parent | 68a0ddfd07a4235187b79a519c1f546cf792ab06 (diff) | |
parent | a4a84206853a46e98ddc3455d6c5f0ea470e8afc (diff) | |
download | genenetwork2-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.py | 6 |
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([]) |