Skip to content

Commit

Permalink
whops that needs to be pre-fetched
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Langhammer <[email protected]>
  • Loading branch information
BeryJu committed Apr 27, 2024
1 parent 4d02ff8 commit 962dd5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion authentik/core/api/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class UserAccountSerializer(PassiveSerializer):
ordering = ["name"]

def get_queryset(self):
base_qs = Group.objects.all().select_related("parent", "roles")
base_qs = Group.objects.all().select_related("parent").prefetch_related("roles")
if self.serializer_class(context={"request": self.request})._should_include_users:
base_qs = base_qs.prefetch_related("users")
return base_qs
Expand Down

0 comments on commit 962dd5c

Please sign in to comment.