Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed bug in metasystem method_get_next_in_order and method_get_previ…

…ous_in_order, related to [549]

git-svn-id: http://code.djangoproject.com/svn/django/trunk@570 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 25aef18d8358e7a89e99caf0c6b91f7179b6572b 1 parent b77114c
@adrianholovaty adrianholovaty authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/core/meta/__init__.py
View
4 django/core/meta/__init__.py
@@ -849,7 +849,7 @@ def method_get_next_in_order(opts, order_field, self):
self._next_in_order_cache = opts.get_model_module().get_object(order_by=('_order',),
where=['_order > (SELECT _order FROM %s WHERE %s=%%s)' % (opts.db_table, opts.pk.column),
'%s=%%s' % order_field.column], limit=1,
- params=[getattr(self, opts.pk.column), getattr(self, order_field.name)])
+ params=[getattr(self, opts.pk.column), getattr(self, order_field.column)])
return self._next_in_order_cache
def method_get_previous_in_order(opts, order_field, self):
@@ -857,7 +857,7 @@ def method_get_previous_in_order(opts, order_field, self):
self._previous_in_order_cache = opts.get_model_module().get_object(order_by=('-_order',),
where=['_order < (SELECT _order FROM %s WHERE %s=%%s)' % (opts.db_table, opts.pk.column),
'%s=%%s' % order_field.column], limit=1,
- params=[getattr(self, opts.pk.column), getattr(self, order_field.name)])
+ params=[getattr(self, opts.pk.column), getattr(self, order_field.column)])
return self._previous_in_order_cache
# RELATIONSHIP METHODS #####################
Please sign in to comment.
Something went wrong with that request. Please try again.