summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorKaren Tracey <kmtracey@gmail.com>2010-03-21 14:23:25 +0000
committerKaren Tracey <kmtracey@gmail.com>2010-03-21 14:23:25 +0000
commitf88c2f16e84703cff225e162297a6bcedebe8910 (patch)
tree63b26300fe866fc105d895aa021e566d98ea7660 /django
parent8661cb9bd38c29af35d785c98d0008323a1734b1 (diff)
Fixed #13004: Ensure the add page for a model with a ManyToManyField specified
in readonly_fields does not raise an exception. Thanks hejsan, mlavin, copelco. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12827 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
-rw-r--r--django/contrib/admin/helpers.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/admin/helpers.py b/django/contrib/admin/helpers.py
index 3c1febd26b..b969653317 100644
--- a/django/contrib/admin/helpers.py
+++ b/django/contrib/admin/helpers.py
@@ -154,7 +154,7 @@ class AdminReadonlyField(object):
field, obj, model_admin = self.field, self.form.instance, self.model_admin
try:
f, attr, value = lookup_field(field, obj, model_admin)
- except (AttributeError, ObjectDoesNotExist):
+ except (AttributeError, ValueError, ObjectDoesNotExist):
result_repr = EMPTY_CHANGELIST_VALUE
else:
if f is None: