From a4a84206853a46e98ddc3455d6c5f0ea470e8afc Mon Sep 17 00:00:00 2001 From: zsloan Date: Fri, 23 Oct 2020 15:13:24 -0500 Subject: Fixed trait export for situations where there's no authors/title/journal --- wqflask/wqflask/show_trait/export_trait_data.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'wqflask') 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([]) -- cgit v1.2.3