From 919205ef856e6226ab210405c48a26a516a6fb50 Mon Sep 17 00:00:00 2001 From: Gary Wilson Jr Date: Sat, 4 Aug 2007 14:41:49 +0000 Subject: [PATCH] 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 --- django/contrib/admin/views/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/contrib/admin/views/main.py b/django/contrib/admin/views/main.py index 874b3559ee6..cfbe9a1f956 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: