Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 919205ef856e6226ab210405c48a26a516a6fb50 1 parent ac027df
Gary Wilson Jr. gdub authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/contrib/admin/views/main.py
2  django/contrib/admin/views/main.py
View
@@ -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:
Please sign in to comment.
Something went wrong with that request. Please try again.