From 7ff623755a03cfbc87f9763659498a820ecfc3be Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Mon, 30 Jan 2006 03:51:55 +0000 Subject: [PATCH] magic-removal: Fixed legacy get_object() call in Model._get_next_or_previous_by_FIELD() git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2172 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/models/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/db/models/base.py b/django/db/models/base.py index 5570413f3c..79bd58acf1 100644 --- a/django/db/models/base.py +++ b/django/db/models/base.py @@ -274,7 +274,7 @@ class Model(object): kwargs.setdefault('params', []).extend([param, param, getattr(self, self._meta.pk.attname)]) kwargs['order_by'] = [(not is_next and '-' or '') + field.name, (not is_next and '-' or '') + self._meta.pk.name] kwargs['limit'] = 1 - return self.__class__._default_manager.get_object(**kwargs) + return self.__class__._default_manager.get(**kwargs) def _get_next_or_previous_in_order(self, is_next): cachename = "__%s_order_cache" % is_next