Skip to content

Commit 6cccdfe

Browse files
committed
Look explicitly into JSON payload vs .params
1 parent 84b2136 commit 6cccdfe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

phylesystem_api/phylesystem_api/views/default.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,8 @@ def trees_in_synth(request):
279279

280280
@view_config(route_name="include_tree_in_synth", renderer="json")
281281
def include_tree_in_synth(request):
282-
study_id = request.params.get("study_id", "").strip()
283-
tree_id = request.params.get("tree_id", "").strip()
282+
study_id = request.json.get("study_id", "").strip()
283+
tree_id = request.json.get("tree_id", "").strip()
284284
# check for empty/missing ids
285285
if (study_id == "") or (tree_id == ""):
286286
raise HTTPBadRequest(
@@ -386,8 +386,8 @@ def include_tree_in_synth(request):
386386

387387
@view_config(route_name="exclude_tree_from_synth", renderer="json")
388388
def exclude_tree_from_synth(request):
389-
study_id = request.params.get("study_id", "").strip()
390-
tree_id = request.params.get("tree_id", "").strip()
389+
study_id = request.json.get("study_id", "").strip()
390+
tree_id = request.json.get("tree_id", "").strip()
391391
# check for empty/missing ids
392392
if (study_id == "") or (tree_id == ""):
393393
raise HTTPBadRequest(

0 commit comments

Comments
 (0)