class OwnerList(generics.ListAPIView):
serializer_class = OwnerDetailSerializer
# queryset = Person.objects.filter(customuser__userrole__role__name='OWNER').distinct()
permission_classes = [IsAuthenticated]
filter_backends = [DjangoFilterBackend]
def get_queryset(self):
return super(OwnerList, self).get_queryset()
I have this simple view and i am trying to over ride the get_queryset. The issue is that when this view is used i get :
return super(OwnerList, self).get_queryset()
File "C:\Users\kdalipaj\PycharmProjects\LTC SYSTEM\venv\lib\site-packages\rest_framework\generics.py", line 63, in get_queryset assert self.queryset is not None, (
AssertionError: 'OwnerList' should either include a
queryset
attribute, or override theget_queryset()
method.
Why is this happening?