mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-29 13:04:03 +03:00
no longer tightly coupled to private queryset API
This commit is contained in:
parent
55650a743d
commit
a751871991
|
@ -215,9 +215,11 @@ class GenericAPIView(views.APIView):
|
||||||
% self.__class__.__name__
|
% self.__class__.__name__
|
||||||
)
|
)
|
||||||
|
|
||||||
|
queryset = self.queryset
|
||||||
if isinstance(self.queryset, QuerySet):
|
if isinstance(self.queryset, QuerySet):
|
||||||
return self.queryset.all()
|
# Ensure queryset is re-evaluated on each request.
|
||||||
return self.queryset
|
queryset = queryset.all()
|
||||||
|
return queryset
|
||||||
|
|
||||||
def get_object(self):
|
def get_object(self):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user