Skip to content

Commit e54aa7f

Browse files
committed
Fix again sentry N+1 issue ifrc-go/issues/3311
1 parent 9182eed commit e54aa7f

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

api/drf_views.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -987,6 +987,10 @@ class AppealDocumentViewset(viewsets.ReadOnlyModelViewSet):
987987
"iso",
988988
).prefetch_related(
989989
"appeal__event__countries_for_preview",
990+
Prefetch(
991+
"appeal__event__appeals",
992+
queryset=Appeal.objects.order_by("-start_date", "-end_date"),
993+
),
990994
)
991995
ordering_fields = (
992996
"created_at",

assets

0 commit comments

Comments
 (0)