1
0
mirror of https://github.com/django/django.git synced 2025-10-24 22:26:08 +00:00

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
This commit is contained in:
Joseph Kocherhans
2010-02-25 17:18:27 +00:00
parent c736cbe816
commit e488c1dc0d
2 changed files with 21 additions and 3 deletions

View File

@@ -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.