Use call_view_method for get_serializer_class
This commit is contained in:
@@ -181,7 +181,7 @@ def get_queryset_from_view(view, serializer=None):
|
|||||||
|
|
||||||
if queryset is not None and serializer is not None:
|
if queryset is not None and serializer is not None:
|
||||||
# make sure the view is actually using *this* serializer
|
# make sure the view is actually using *this* serializer
|
||||||
assert type(serializer) == view.get_serializer_class()
|
assert type(serializer) == call_view_method(view, 'get_serializer_class', 'serializer_class')
|
||||||
|
|
||||||
return queryset
|
return queryset
|
||||||
except Exception: # pragma: no cover
|
except Exception: # pragma: no cover
|
||||||
|
|||||||
Reference in New Issue
Block a user