aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2020-04-29 11:19:21 -0500
committerzsloan2020-04-29 11:19:21 -0500
commit5b57353c5325a2677fef07630d2576a01641787a (patch)
tree94ce5af1c3207151a1dbdb86f116771e31799b56 /wqflask
parentd4061f13f30c6fbb48180dcd6d65fda200731d81 (diff)
downloadgenenetwork2-5b57353c5325a2677fef07630d2576a01641787a.tar.gz
Fixed issue with global search when description field is empty
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/gsearch.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/wqflask/wqflask/gsearch.py b/wqflask/wqflask/gsearch.py
index 3d9b508a..04e3d578 100644
--- a/wqflask/wqflask/gsearch.py
+++ b/wqflask/wqflask/gsearch.py
@@ -75,7 +75,10 @@ class GSearch(object):
this_trait['group'] = line[1]
this_trait['tissue'] = line[2]
this_trait['symbol'] = line[6]
- this_trait['description'] = line[7].decode('utf-8', 'replace')
+ if line[7]:
+ this_trait['description'] = line[7].decode('utf-8', 'replace')
+ else:
+ this_trait['description'] = "N/A"
this_trait['location_repr'] = 'N/A'
if (line[8] != "NULL" and line[8] != "") and (line[9] != 0):
this_trait['location_repr'] = 'Chr%s: %.6f' % (line[8], float(line[9]))