no longer tightly coupled to private queryset API

This commit is contained in:
Tom Christie 2014-09-11 20:50:26 +01:00
parent 55650a743d
commit a751871991

View File

@ -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):
""" """