From 212720bdb3c26528b4efdf8b101aee213ab794e5 Mon Sep 17 00:00:00 2001 From: Rohan Moniz <60864468+rm03@users.noreply.github.com> Date: Mon, 22 Apr 2024 14:41:18 -0400 Subject: [PATCH] fix N+1 query due to attribute --- backend/clubs/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/clubs/views.py b/backend/clubs/views.py index 0df83b37f..869ece0fb 100644 --- a/backend/clubs/views.py +++ b/backend/clubs/views.py @@ -2876,7 +2876,8 @@ def get_queryset(self): if "fair" in self.request.query_params else Badge.objects.filter(visible=True) ), - ) + ), + "tickets", ) .order_by("start_time") )