Permalink
Browse files

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
  • Loading branch information...
1 parent ac027df commit 919205ef856e6226ab210405c48a26a516a6fb50 @gdub gdub committed Aug 4, 2007
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/contrib/admin/views/main.py
View
2 django/contrib/admin/views/main.py
@@ -673,7 +673,7 @@ def get_ordering(self):
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:

0 comments on commit 919205e

Please sign in to comment.