mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-12-02 22:44:08 +03:00
Add missing piece to commit 02b2020995
I missed copying this change from the test environment.
This commit is contained in:
parent
02b2020995
commit
c3cb70ac96
|
@ -516,8 +516,8 @@ class ModelMixin(object):
|
||||||
"""
|
"""
|
||||||
queryset = getattr(self.resource, 'queryset',
|
queryset = getattr(self.resource, 'queryset',
|
||||||
self.resource.model.objects.all())
|
self.resource.model.objects.all())
|
||||||
return getattr(self.resource, 'queryset',
|
return queryset() if isinstance(queryset, Callable) else queryset
|
||||||
self.resource.model.objects.all())
|
|
||||||
|
|
||||||
def get_ordering(self):
|
def get_ordering(self):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user