You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a viewset only has get_queryset implemented but fails to declare a queryset class property, DRF model pusher errors when trying to find the backend. I think it should try it's current way but if no queryset exists on the view, call get_queryset or even allow specific backends to be declared on the view.
File "/Users/abc/Documents/xyz/Code/abc-api/.venv/lib/python3.6/site-packages/rest_framework/viewsets.py", line 83, in view
self = cls(**initkwargs)
File "/Users/abc/Documents/xyz/Code/abc-api/.venv/lib/python3.6/site-packages/drf_model_pusher/views.py", line 26, in __init__
self.pusher_backends = self.get_models_pusher_backends()
File "/Users/abc/Documents/xyz/Code/abc-api/.venv/lib/python3.6/site-packages/drf_model_pusher/views.py", line 30, in get_models_pusher_backends
model = self.queryset.model
AttributeError: 'NoneType' object has no attribute 'model'
The text was updated successfully, but these errors were encountered:
When a viewset only has
get_queryset
implemented but fails to declare aqueryset
class property, DRF model pusher errors when trying to find the backend. I think it should try it's current way but if noqueryset
exists on the view, callget_queryset
or even allow specific backends to be declared on the view.The text was updated successfully, but these errors were encountered: