Skip to content

Commit c1cba50

Browse files
committed
Fix per-formquestion query n+1 issue
1 parent 08242a3 commit c1cba50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

per/drf_views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def get_queryset(self):
193193
return (
194194
FormQuestion.objects.all()
195195
.order_by("component__component_num", "question_num", "question")
196-
.select_related("component")
196+
.select_related("component", "component__area")
197197
.prefetch_related("answers")
198198
)
199199

0 commit comments

Comments
 (0)