### Eclipse Workspace Patch 1.0 #P django Index: django/forms/models.py =================================================================== --- django/forms/models.py (revision 15024) +++ django/forms/models.py (working copy) @@ -707,11 +707,18 @@ if self.save_as_new: return 0 return super(BaseInlineFormSet, self).initial_form_count() - - def total_form_count(self): - if self.save_as_new: - return super(BaseInlineFormSet, self).initial_form_count() - return super(BaseInlineFormSet, self).total_form_count() + +# TODO(rax): Remove this method to fix http://code.djangoproject.com/ticket/14938 +# super(BaseInlineFormSet, self).initial_form_count() when save_as_new +# is True is the number of already existing instances which have to be copied. +# Here we want the total number. Removing this method fix the issue. +# However I have no clue why this method was added. I hope this helps +#=============================================================================== +# def total_form_count(self): +# if self.save_as_new: +# return super(BaseInlineFormSet, self).initial_form_count() +# return super(BaseInlineFormSet, self).total_form_count() +#=============================================================================== def _construct_form(self, i, **kwargs): form = super(BaseInlineFormSet, self)._construct_form(i, **kwargs)