aboutsummaryrefslogtreecommitdiff
path: root/gn3/api/correlation.py
diff options
context:
space:
mode:
authorzsloan2022-03-28 17:31:32 +0000
committerzsloan2022-03-28 17:31:32 +0000
commitb93b22386056347d8002dd2e403425beeb4657cd (patch)
tree60bcf140c1a40177f4f6a2a634f188b2ef27a522 /gn3/api/correlation.py
parent5906098d32e7aa1ab155d5dd49cd3b04b06684eb (diff)
downloadgenenetwork3-b93b22386056347d8002dd2e403425beeb4657cd.tar.gz
Run json.loads on request.get_json, since request.get_json was just returning a string
Diffstat (limited to 'gn3/api/correlation.py')
-rw-r--r--gn3/api/correlation.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/gn3/api/correlation.py b/gn3/api/correlation.py
index 7eb7cd6..f2ffe8a 100644
--- a/gn3/api/correlation.py
+++ b/gn3/api/correlation.py
@@ -1,4 +1,5 @@
"""Endpoints for running correlations"""
+import json
import sys
from functools import reduce
@@ -110,7 +111,7 @@ def partial_correlation():
return reduce(__field_errors__(request_data), fields, errors)
- args = request.get_json()
+ args = json.loads(request.get_json())
request_errors = __errors__(
args, ("primary_trait", "control_traits", "target_db", "method"))
if request_errors: