From c2c8ec5b13f67a58035a9ea48ea0a6e0ff2813d8 Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 2 Feb 2026 17:12:23 +0000 Subject: [PATCH] Update question prefetching logic to include 'sbas' app --- generic/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generic/views.py b/generic/views.py index 6ceeb7a4..ba4292a0 100644 --- a/generic/views.py +++ b/generic/views.py @@ -3576,7 +3576,7 @@ class ExamViews(View, LoginRequiredMixin): # Load questions; prefetch 'answers' for apps that use them to avoid repeated DB hits questions_qs = exam.get_questions() - if self.app_name not in ("physics",): + if self.app_name not in ("physics", "sbas"): questions_qs = questions_qs.prefetch_related("answers") # Materialize questions list for iteration