Ticket #18747: 18747.diff
File 18747.diff, 894 bytes (added by , 12 years ago) |
---|
-
admin_list.py
174 174 row_class = '' 175 175 try: 176 176 f, attr, value = lookup_field(field_name, result, cl.model_admin) 177 except (AttributeError, ObjectDoesNotExist): 177 except (AttributeError, ObjectDoesNotExist) as e: 178 if isinstance(e, AttributeError): 179 if str(e): 180 import re 181 err_msg = re.match(r'\'([\w]+)\'', str(e)) 182 if err_msg is not None and not(err_msg.groups()[0]==cl.model._meta.object_name): 183 #distinguish between errors raised by the model or any other object 184 raise e 178 185 result_repr = EMPTY_CHANGELIST_VALUE 179 186 else: 180 187 if f is None: