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().
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
withself.get_queryset()
.