Skip to content

Commit

Permalink
fix for issue t0ster#1 - incorrect instance in kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcin Nowak committed Dec 12, 2011
1 parent 4f684ac commit 6ac9ff3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion composite_form/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ def __init__(self, data=None, files=None, *args, **initkwargs):
raise ValueError("instances should be a list the same lenth as form_list")
if len(instances) != len(self.form_list):
raise ValueError("instances should be a list the same lenth as form_list")
kwargs = initkwargs.copy()
self.is_bound = data is not None or files is not None
self.instances = instances

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)
Expand Down

0 comments on commit 6ac9ff3

Please sign in to comment.