Ticket #13004: catch_value_error.diff

File catch_value_error.diff, 609 bytes (added by hejsan, 6 years ago)

Very simple fix, just catch one more Exception

  • django/contrib/admin/helpers.py

     
    154154        field, obj, model_admin = self.field, self.form.instance, self.model_admin
    155155        try:
    156156            f, attr, value = lookup_field(field, obj, model_admin)
    157         except (AttributeError, ObjectDoesNotExist):
     157        except (AttributeError, ValueError, ObjectDoesNotExist):
    158158            result_repr = EMPTY_CHANGELIST_VALUE
    159159        else:
    160160            if f is None:
Back to Top