.
This commit is contained in:
+1
-1
@@ -1045,7 +1045,7 @@ class ExamViews(View, LoginRequiredMixin):
|
|||||||
questions = exam.exam_questions.all()
|
questions = exam.exam_questions.all()
|
||||||
|
|
||||||
# We could prefect the CidUserAnswers.answers here (if we didn't cache them)
|
# We could prefect the CidUserAnswers.answers here (if we didn't cache them)
|
||||||
cid_user_answers = self.CidUserAnswer.objects.select_related("question").filter(
|
cid_user_answers = self.CidUserAnswer.objects.select_related("question").prefetch_related("answers").filter(
|
||||||
question__in=questions, exam__id=pk
|
question__in=questions, exam__id=pk
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user