#10750 closed (fixed)
BaseInlineFormSet does not respect commit=False in save for new objects after r10190
Description ¶
The save_new method on BaseInlineFormSet does not respect the commit bit passed to it (it saves the object even if commit=False). This method was added in r10190.
This means that if there are required fields that the forms on the inlineformset do not contain, you get an error, even if you use commit=False to add the required information to the new objects yourself.
Possible fix: do not do obj.save() if commit is False (line 549 in django/forms/models.py).
Change History (7)
by , 16 years ago
Attachment: | 10750_baseinlineformset_savenew.diff added |
---|
by , 16 years ago
Attachment: | 10750_baseinlineformset_savenew.2.diff added |
---|
new try, replace messed up diff
comment:1 by , 16 years ago
Has patch: | set |
---|---|
Owner: | changed from | to
Status: | new → assigned |
Triage Stage: | Unreviewed → Accepted |
Thanks for adding a test case. I'll put this on my review list for 1.1.
comment:2 by , 16 years ago
Component: | Uncategorized → Forms |
---|
comment:3 by , 16 years ago
milestone: | → 1.1 |
---|
comment:4 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
fix and test for baseinlineformset save not respecting commit=False