Ticket #3397: patch_allow_ordering_by_nonfields_fix.diff

File patch_allow_ordering_by_nonfields_fix.diff, 610 bytes (added by anonymous, 17 years ago)
  • django/contrib/admin/views/main.py

     
    355355                    try:
    356356                        attr = getattr(self.model, field_name)
    357357                        order_field = attr.admin_order_field
    358                     except IndexError:
     358                    except AttributeError:
    359359                        pass
    360360                else:
    361361                    if not isinstance(f.rel, models.ManyToOneRel) or not f.null:
Back to Top