This commit is contained in:
Ross
2021-05-15 13:00:25 +01:00
parent 4e273717c1
commit 2deb8b8aa4
2 changed files with 38 additions and 3 deletions
+2
View File
@@ -231,6 +231,7 @@ def answer_suggestion_confirm(request):
if request.is_ajax and request.method == "POST":
question_type = request.POST.get("question_type")
aid = request.POST.get("aid")
status = request.POST.get("status")
if question_type == "anatomy":
AnswerModel = AnatomyAnswer
@@ -243,5 +244,6 @@ def answer_suggestion_confirm(request):
answer = get_object_or_404(AnswerModel, pk=aid)
answer.proposed = False
answer.status = status
answer.save()
return JsonResponse({"success": True, "error": "Answer changed"})