mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #10750: respect comment=False in inline formsets. Thanks, Koen Biermans.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10706 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -734,7 +734,8 @@ class BaseInlineFormSet(BaseModelFormSet):
|
||||
# save the object.
|
||||
obj = form.save(commit=False)
|
||||
setattr(obj, self.fk.get_attname(), self.instance.pk)
|
||||
obj.save()
|
||||
if commit:
|
||||
obj.save()
|
||||
# form.save_m2m() can be called via the formset later on if commit=False
|
||||
if commit and hasattr(form, 'save_m2m'):
|
||||
form.save_m2m()
|
||||
|
||||
Reference in New Issue
Block a user