From c4cf8d2c380e1303d732ea519eb7d7ba8018abef Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Tue, 22 Feb 2022 15:06:32 +0100 Subject: [PATCH] Select related user, reduce db queries --- shared/auth/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/auth/views.py b/shared/auth/views.py index 09667a0..7d3f172 100644 --- a/shared/auth/views.py +++ b/shared/auth/views.py @@ -174,7 +174,7 @@ class PermissionManagementView(StaffMemberMixin, SuccessMessageMixin, FormView): class JournalView(StaffMemberMixin, ListView): - model = Event + queryset = Event.objects.select_related("user") template_name = "auth/journal.html"