From c3cb70ac965d8ee6d26d15d07f5fe09437f03a03 Mon Sep 17 00:00:00 2001 From: "Sean C. Farley" Date: Mon, 5 Mar 2012 20:36:33 -0500 Subject: [PATCH] Add missing piece to commit 02b2020995 I missed copying this change from the test environment. --- djangorestframework/mixins.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/djangorestframework/mixins.py b/djangorestframework/mixins.py index 8977ccb68..c1667b02f 100644 --- a/djangorestframework/mixins.py +++ b/djangorestframework/mixins.py @@ -516,8 +516,8 @@ class ModelMixin(object): """ queryset = getattr(self.resource, 'queryset', self.resource.model.objects.all()) - return getattr(self.resource, 'queryset', - self.resource.model.objects.all()) + return queryset() if isinstance(queryset, Callable) else queryset + def get_ordering(self): """