BaseInlineFormSet does not respect commit=False in save for new objects after r10190
|Reported by:||Owned by:||jkocherhans|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
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)
comment:1 Changed 8 years ago by
|Owner:||changed from nobody to jkocherhans|
|Status:||new → assigned|
|Triage Stage:||Unreviewed → Accepted|