diff --git a/generic/views.py b/generic/views.py index 85819e62..e7c408dc 100644 --- a/generic/views.py +++ b/generic/views.py @@ -321,9 +321,10 @@ class ExamViews(View, LoginRequiredMixin): preserved = Case(*[When(pk=pk, then=pos) for pos, pk in enumerate(new_order)]) objects = self.Question.objects.filter(pk__in=new_order).order_by(preserved) - if len(objects) != exam.exam_questions.count(): - data = {"status": "error, count does not match"} - return JsonResponse(data, status=400) + # We now allow deleting exam questions + #if len(objects) != exam.exam_questions.count(): + # data = {"status": "error, count does not match"} + # return JsonResponse(data, status=400) exam.exam_questions.set(objects) exam.save()