Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion readthedocs/api/v2/views/model_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def get_serializer_class(self):
pre-process the `command` field before returning it to the user, and we
also want to have a specific serializer for admins.
"""
if self.request.build_api_key:
if self.request.build_api_key or self.request.user.is_superuser:
# Logic copied from `UserSelectViewSet.get_serializer_class`
# and extended to choose serializer from self.action
if self.action not in ["list", "retrieve"]:
Expand Down