admin: fix warning during swagger generation

This commit is contained in:
Jens Langhammer 2020-12-17 19:49:35 +01:00
parent 349a3a67d5
commit 68adc2d5a5
2 changed files with 6 additions and 0 deletions

View File

@ -51,6 +51,9 @@ class VersionViewSet(ListModelMixin, GenericViewSet):
permission_classes = [IsAdminUser] permission_classes = [IsAdminUser]
def get_queryset(self):
return None
@swagger_auto_schema(responses={200: VersionSerializer(many=True)}) @swagger_auto_schema(responses={200: VersionSerializer(many=True)})
def list(self, request: Request) -> Response: def list(self, request: Request) -> Response:
"""Get running and latest version.""" """Get running and latest version."""

View File

@ -15,6 +15,9 @@ class WorkerViewSet(ListModelMixin, GenericViewSet):
serializer_class = Serializer serializer_class = Serializer
permission_classes = [IsAdminUser] permission_classes = [IsAdminUser]
def get_queryset(self):
return None
def list(self, request: Request) -> Response: def list(self, request: Request) -> Response:
"""Get currently connected worker count.""" """Get currently connected worker count."""
return Response( return Response(