1
0
mirror of https://github.com/django/django.git synced 2025-10-25 06:36:07 +00:00

Fixed #10363 -- Modified ModelForm handling to ensure that excluded fields can't be saved onto the model. Thanks to jgoldberg for the report, an Alex Gaynor for the fix.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10575 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee
2009-04-16 14:26:08 +00:00
parent 6590061a00
commit 419ed44436
2 changed files with 22 additions and 2 deletions

View File

@@ -334,7 +334,8 @@ class BaseModelForm(BaseForm):
fail_message = 'created'
else:
fail_message = 'changed'
return save_instance(self, self.instance, self._meta.fields, fail_message, commit)
return save_instance(self, self.instance, self._meta.fields,
fail_message, commit, exclude=self._meta.exclude)
save.alters_data = True