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:
parent
ea1d8471c2
commit
855d9909c6
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user