Api view warnings

This commit is contained in:
shamoon 2024-11-30 10:53:19 -08:00
parent ad18759d50
commit eed4db3730
2 changed files with 3 additions and 5 deletions

View File

@ -67,7 +67,6 @@ from rest_framework.mixins import RetrieveModelMixin
from rest_framework.mixins import UpdateModelMixin from rest_framework.mixins import UpdateModelMixin
from rest_framework.permissions import IsAuthenticated from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response from rest_framework.response import Response
from rest_framework.views import APIView
from rest_framework.viewsets import GenericViewSet from rest_framework.viewsets import GenericViewSet
from rest_framework.viewsets import ModelViewSet from rest_framework.viewsets import ModelViewSet
from rest_framework.viewsets import ReadOnlyModelViewSet from rest_framework.viewsets import ReadOnlyModelViewSet
@ -1265,7 +1264,7 @@ class SelectionDataView(GenericAPIView):
return r return r
class SearchAutoCompleteView(APIView): class SearchAutoCompleteView(GenericAPIView):
permission_classes = (IsAuthenticated,) permission_classes = (IsAuthenticated,)
def get(self, request, format=None): def get(self, request, format=None):
@ -1492,7 +1491,7 @@ class GlobalSearchView(PassUserMixin):
) )
class StatisticsView(APIView): class StatisticsView(GenericAPIView):
permission_classes = (IsAuthenticated,) permission_classes = (IsAuthenticated,)
def get(self, request, format=None): def get(self, request, format=None):

View File

@ -27,7 +27,6 @@ from rest_framework.pagination import PageNumberPagination
from rest_framework.permissions import DjangoModelPermissions from rest_framework.permissions import DjangoModelPermissions
from rest_framework.permissions import IsAuthenticated from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response from rest_framework.response import Response
from rest_framework.views import APIView
from rest_framework.viewsets import ModelViewSet from rest_framework.viewsets import ModelViewSet
from documents.permissions import PaperlessObjectPermissions from documents.permissions import PaperlessObjectPermissions
@ -315,7 +314,7 @@ class DisconnectSocialAccountView(GenericAPIView):
return HttpResponseBadRequest("Social account not found") return HttpResponseBadRequest("Social account not found")
class SocialAccountProvidersView(APIView): class SocialAccountProvidersView(GenericAPIView):
""" """
List of social account providers List of social account providers
""" """