t0ster/django-composite-form — Issue #1: form instance is incorrectly propagated to other forms
Author: marcinn
Created: 2011-12-12 14:10:50+00:00
State: open

if instance is None a previous kwargs dictionary is used in next iteration.
Affected code (forms.CompositeForm.__init__):

```
for form in self.form_list:
if self.get_form_instance(form):
kwargs.update({"instance": self.get_form_instance(form)})
self._form_instances[form] = form(data, files, *args, **kwargs)
```

a possible fix:

```
for form in self.form_list:
**kwargs = initkwargs.copy()**
if self.get_form_instance(form):
kwargs.update({"instance": self.get_form_instance(form)})
self._form_instances[form] = form(data, files, *args, **kwargs)
```