diff --git a/readthedocs/api/v2/views/model_views.py b/readthedocs/api/v2/views/model_views.py index b0ee7dff1cf..f84158f3981 100644 --- a/readthedocs/api/v2/views/model_views.py +++ b/readthedocs/api/v2/views/model_views.py @@ -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"]: