aboutsummaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2019-01-20 14:30:53 +0100
committerGravatar Johannes Christ <[email protected]>2019-01-20 14:30:53 +0100
commit4cb7cfe58b5a24bf9b85cdb71e5b444600ecd07c (patch)
treea20e3fec63811d4f94275d69dc64cfcd277d739c /api
parentAdd the `watch` infraction type. (diff)
Chonk down horrible JOIN performance.
Diffstat (limited to 'api')
-rw-r--r--api/viewsets.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/api/viewsets.py b/api/viewsets.py
index e923ffb3..f8dd13e8 100644
--- a/api/viewsets.py
+++ b/api/viewsets.py
@@ -800,4 +800,4 @@ class UserViewSet(BulkCreateModelMixin, ModelViewSet):
"""
serializer_class = UserSerializer
- queryset = User.objects.all()
+ queryset = User.objects.prefetch_related('roles')