From 1bfb480f52fcef9f7768b3a42bc3f89e017aea24 Mon Sep 17 00:00:00 2001 From: Ross Date: Wed, 7 Jul 2021 17:14:02 +0100 Subject: [PATCH] . --- rad/views.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/rad/views.py b/rad/views.py index 1ae8df0e..ca9a57d1 100644 --- a/rad/views.py +++ b/rad/views.py @@ -251,11 +251,10 @@ def answer_suggestion_submit(request): @login_required def answer_submit(request): if request.is_ajax and request.method == "POST": - post_data = json.loads(request.body) - qid = post_data["qid"] - question_type = post_data["question_type"] - answer_string = post_data["answer"] - status = post_data["status"] + qid = request.POST.get("qid") + question_type = request.POST.get("question_type") + answer_string = request.POST.get("answer") + status = request.POST.get("status") if str(status) not in "012": return JsonResponse({"success": False, "error": "Invalid status"})