diff --git a/anatomy/views.py b/anatomy/views.py index a6d27ae7..954d5e34 100644 --- a/anatomy/views.py +++ b/anatomy/views.py @@ -317,6 +317,7 @@ def loadJsonAnswer(answer): return True + def exam_json_edit(request, pk): if request.is_ajax() and request.method == "POST": @@ -326,7 +327,7 @@ def exam_json_edit(request, pk): for q in exam.exam_questions.all(): q.open_acess = request.POST.get("set_open_access") q.save() - questions_changed.append(q) + questions_changed.append(q.pk) data = {"status": "success", "questions": json.dumps(questions_changed)} return JsonResponse(data, status=200)