aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base/trait.py
diff options
context:
space:
mode:
authorPjotr Prins2018-10-12 08:24:16 +0000
committerPjotr Prins2018-10-12 08:24:16 +0000
commit5162d1484f01a51d65e7e70143146f018d96edb4 (patch)
tree0ebcdab6a10a1d112dd5a36512352314219fcc56 /wqflask/base/trait.py
parentdd743c8311b26f6a786c346cf4deed144c6a9b61 (diff)
parent261ba5e41408d212cc3c33df658b6be2431f68ad (diff)
downloadgenenetwork2-5162d1484f01a51d65e7e70143146f018d96edb4.tar.gz
Merge branch 'testing' of github.com:genenetwork/genenetwork2 into gn-testing
Diffstat (limited to 'wqflask/base/trait.py')
-rw-r--r--wqflask/base/trait.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py
index 3daf9ea9..e57d4176 100644
--- a/wqflask/base/trait.py
+++ b/wqflask/base/trait.py
@@ -189,7 +189,8 @@ def get_sample_data():
trait_dict['symbol'] = trait_ob.symbol
trait_dict['location'] = trait_ob.location_repr
elif trait_ob.dataset.type == "Publish":
- trait_dict['pubmed_link'] = trait_ob.pubmed_link
+ if trait_ob.pubmed_id:
+ trait_dict['pubmed_link'] = trait_ob.pubmed_link
trait_dict['pubmed_text'] = trait_ob.pubmed_text
return json.dumps([trait_dict, {key: value.value for key, value in trait_ob.data.iteritems() }])