Skip to content

Commit

Permalink
Fix emergency-projects by event n+1 selects
Browse files Browse the repository at this point in the history
  • Loading branch information
szabozoltan69 committed Jun 30, 2024
1 parent a841161 commit b783f07
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion deployments/drf_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,8 @@ class EmergencyProjectViewSet(
):
queryset = (
EmergencyProject.objects.select_related("created_by", "reporting_ns", "event", "country", "deployed_eru", "modified_by")
.prefetch_related("districts", "activities", "admin2")
.prefetch_related("districts", "admin2", "event__appeals", "event__countries_for_preview",
"activities", "activities__sector", "activities__action", "activities__action__supplies", "activities__points")
.order_by("-modified_at")
.all()
)
Expand Down

0 comments on commit b783f07

Please sign in to comment.