summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Wilson Jr <gary.wilson@gmail.com>2007-08-04 14:41:49 +0000
committerGary Wilson Jr <gary.wilson@gmail.com>2007-08-04 14:41:49 +0000
commit919205ef856e6226ab210405c48a26a516a6fb50 (patch)
tree4c58e3389d34908cd18c3ee9c46a0cf2c0a08055
parentac027df2539858b8dfcb7fe6b3da19b2573f147c (diff)
Refs #3397 -- Corrected the Exception that is caught when ordering by non-fields (added in [4596]), thanks glin@seznam.cz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5799 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/contrib/admin/views/main.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/admin/views/main.py b/django/contrib/admin/views/main.py
index 874b3559ee..cfbe9a1f95 100644
--- a/django/contrib/admin/views/main.py
+++ b/django/contrib/admin/views/main.py
@@ -673,7 +673,7 @@ class ChangeList(object):
try:
attr = getattr(lookup_opts.admin.manager.model, field_name)
order_field = attr.admin_order_field
- except IndexError:
+ except AttributeError:
pass
else:
if not isinstance(f.rel, models.ManyToOneRel) or not f.null: