shellfly / django-vote

Simple vote for django
http://django-vote.readthedocs.io
Apache License 2.0
158 stars 49 forks source link

AttributeError: 'NoteType' exception in viewsets without queryset attribute #83

Closed harikvpy closed 1 year ago

harikvpy commented 2 years ago

ViewSets that dynamically determines the queryset it should operate on, would override get_queryset() method omitting the queryset class attribute. In such viewsets, VoteMixin would cause an exception during runtime.

Solution is to replace all self.queryset with self.get_queryset().