1
0
mirror of https://github.com/django/django.git synced 2025-07-04 09:49:12 +00:00

Exception handling fix for change lists. Cheers plisk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/new-admin@1367 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Robert Wittams 2005-11-23 16:18:17 +00:00
parent ea1d8471c2
commit 855d9909c6

View File

@ -115,10 +115,10 @@ def items_for_result(cl, result):
except meta.FieldDoesNotExist:
# For non-field list_display values, the value is a method
# name. Execute the method.
func = getattr(result, field_name)
try:
func = getattr(result, field_name)
result_repr = str(func())
except ObjectDoesNotExist:
except AttributeError, ObjectDoesNotExist:
result_repr = EMPTY_CHANGELIST_VALUE
else:
# Strip HTML tags in the resulting text, except if the