mirror of https://github.com/django/django.git
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
This commit is contained in:
parent
ac027df253
commit
919205ef85
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue