.
This commit is contained in:
+4
-5
@@ -251,11 +251,10 @@ def answer_suggestion_submit(request):
|
|||||||
@login_required
|
@login_required
|
||||||
def answer_submit(request):
|
def answer_submit(request):
|
||||||
if request.is_ajax and request.method == "POST":
|
if request.is_ajax and request.method == "POST":
|
||||||
post_data = json.loads(request.body)
|
qid = request.POST.get("qid")
|
||||||
qid = post_data["qid"]
|
question_type = request.POST.get("question_type")
|
||||||
question_type = post_data["question_type"]
|
answer_string = request.POST.get("answer")
|
||||||
answer_string = post_data["answer"]
|
status = request.POST.get("status")
|
||||||
status = post_data["status"]
|
|
||||||
|
|
||||||
if str(status) not in "012":
|
if str(status) not in "012":
|
||||||
return JsonResponse({"success": False, "error": "Invalid status"})
|
return JsonResponse({"success": False, "error": "Invalid status"})
|
||||||
|
|||||||
Reference in New Issue
Block a user