aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2021-12-20 20:48:39 +0000
committerzsloan2021-12-20 14:50:17 -0600
commitb8261fdf3775f2e6f9496f5b33ea002e30fc9f67 (patch)
tree98d1d59a03a13ae0fbe04e60364fd8d9bc3900bf
parent69676ecd49a779350ef7bd3faa348c7f27602a20 (diff)
downloadgenenetwork2-b8261fdf3775f2e6f9496f5b33ea002e30fc9f67.tar.gz
This should fix ProbeSet trait descriptions in the search results, which previousluy weren't showing the proper description
-rw-r--r--wqflask/wqflask/search_results.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/wqflask/wqflask/search_results.py b/wqflask/wqflask/search_results.py
index 33f9319c..af0ce44f 100644
--- a/wqflask/wqflask/search_results.py
+++ b/wqflask/wqflask/search_results.py
@@ -120,7 +120,9 @@ class SearchResultPage:
trait_dict['display_name'] = result[2]
trait_dict['hmac'] = hmac.data_hmac('{}:{}'.format(trait_dict['display_name'], trait_dict['dataset']))
trait_dict['symbol'] = "N/A" if result[3] is None else result[3].strip()
- description_text = "N/A" if result[4] is None or str(result[4]) == "" else trait_dict['symbol']
+ description_text = ""
+ if result[4] is None or str(result[4]) != "":
+ description_text = result[4].decode('utf-8')
target_string = result[5].decode('utf-8') if result[5] else ""
description_display = description_text if target_string is None or str(target_string) == "" else description_text + "; " + str(target_string).strip()