From f92100ca1eceb1a5440fc08d950a4001ed3b6b73 Mon Sep 17 00:00:00 2001 From: zsloan Date: Sun, 9 Jun 2019 11:01:53 -0500 Subject: Added fix for error when records don't have mean expression in global search --- wqflask/wqflask/gsearch.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wqflask/wqflask/gsearch.py b/wqflask/wqflask/gsearch.py index 62398154..5910d77b 100644 --- a/wqflask/wqflask/gsearch.py +++ b/wqflask/wqflask/gsearch.py @@ -78,7 +78,10 @@ class GSearch(object): 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])) - this_trait['mean'] = '%.3f' % line[10] + try: + this_trait['mean'] = '%.3f' % line[10] + except: + this_trait['mean'] = "N/A" this_trait['LRS_score_repr'] = "N/A" if line[11] != "" and line[11] != None: this_trait['LRS_score_repr'] = '%3.1f' % line[11] -- cgit v1.2.3