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: