Commit 6f2c3bcb by Felipe Bidu

Further clarifying the message when get_queryset returns None to include the…

Further clarifying the message when get_queryset returns None to include the class name that was called
parent 5fd01d06
......@@ -123,7 +123,7 @@ class DjangoModelPermissions(BasePermission):
if hasattr(view, 'get_queryset'):
queryset = view.get_queryset()
assert queryset is not None, (
'The `.get_queryset()` method from the view did not return anything.'
'Return of {}.get_queryset() was None'.format(view.__class__.__name__)
)
else:
queryset = getattr(view, 'queryset', None)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment