mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-25 19:14:01 +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__
|
||||
)
|
||||
|
||||
queryset = self.queryset
|
||||
if isinstance(self.queryset, QuerySet):
|
||||
return self.queryset.all()
|
||||
return self.queryset
|
||||
# Ensure queryset is re-evaluated on each request.
|
||||
queryset = queryset.all()
|
||||
return queryset
|
||||
|
||||
def get_object(self):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user