aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2022-10-04 17:53:54 +0000
committerzsloan2022-10-04 17:55:00 +0000
commitde5aa0645cb870f728bb24ed095f28465012eb24 (patch)
tree1662a9671c968bec3a48a5fa7eecaaa4fe082db9 /wqflask
parent028cc01a4fa94e59e643da40f7bb0318fc4fa868 (diff)
downloadgenenetwork2-de5aa0645cb870f728bb24ed095f28465012eb24.tar.gz
Initialize result_list for /traits endpoint JSON output
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/api/router.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/wqflask/wqflask/api/router.py b/wqflask/wqflask/api/router.py
index 3a7dee77..41901159 100644
--- a/wqflask/wqflask/api/router.py
+++ b/wqflask/wqflask/api/router.py
@@ -440,6 +440,7 @@ def fetch_traits(dataset_name, file_format="json"):
if file_format == "json":
filename = dataset_name + "_traits.json"
cursor.execute(query.format(dataset_id))
+ result_list = []
for result in cursor.fetchall():
trait_dict = {}
for i, field in enumerate(field_list):