aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2022-03-30 11:20:04 +0300
committerFrederick Muriuki Muriithi2022-03-30 11:20:04 +0300
commit83dc666dd35a5c275c0182ae3f580a37fd67d98b (patch)
treed5e433cd0827d1bf0116761831d8485eac82296a /wqflask
parent938b9dafafe7b9f72827d7d28ce0706b03eb71ce (diff)
downloadgenenetwork2-83dc666dd35a5c275c0182ae3f580a37fd67d98b.tar.gz
Remove double-encoding to json
Passing the data into `requests.post` as a `json=...` argument will automatically encode the data to JSON and set up the correct Content-Type header. The call `json.dumps(post_data)` was pre-encoding the data to a JSON string, that was the re-encoded to JSON yet again, which is not what we want. This commit fixes that.X
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/partial_correlations_views.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/wqflask/wqflask/partial_correlations_views.py b/wqflask/wqflask/partial_correlations_views.py
index 659b49e9..41bbe7d7 100644
--- a/wqflask/wqflask/partial_correlations_views.py
+++ b/wqflask/wqflask/partial_correlations_views.py
@@ -236,7 +236,7 @@ def partial_correlations():
}
return handle_response(requests.post(
url=f"{GN_SERVER_URL}api/correlation/partial",
- json=json.dumps(post_data)))
+ json=post_data))
for error in args["errors"]:
flash(error, "alert-danger")