summaryrefslogtreecommitdiff
path: root/django/forms/models.py
diff options
context:
space:
mode:
authorJoseph Kocherhans <joseph@jkocherhans.com>2010-02-25 17:18:27 +0000
committerJoseph Kocherhans <joseph@jkocherhans.com>2010-02-25 17:18:27 +0000
commite488c1dc0d29f2de0d8bb31db604aa6384b7a60b (patch)
treeaa6ddcb32958af6252574b2dc6b60bfad0eb2caf /django/forms/models.py
parentc736cbe81645bcb0aa608ae3588edaf01f787806 (diff)
Fixed #12901. Again. Model validation will not be performed on excluded fields that were overridden in the form. Thanks, ammarr.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12590 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/forms/models.py')
-rw-r--r--django/forms/models.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/django/forms/models.py b/django/forms/models.py
index 96e2008e3f..65fe1a7bd4 100644
--- a/django/forms/models.py
+++ b/django/forms/models.py
@@ -280,6 +280,8 @@ class BaseModelForm(BaseForm):
# class. See #12901.
elif self._meta.fields and field not in self._meta.fields:
exclude.append(f.name)
+ elif self._meta.exclude and field in self._meta.exclude:
+ exclude.append(f.name)
# Exclude fields that failed form validation. There's no need for
# the model fields to validate them as well.