Revert "Restore ModelForm instance check on Resource's get_bound_form()"

This reverts commit 392117b7ed.
This commit is contained in:
Camille Harang 2012-02-10 21:55:17 +01:00
parent a6b16bb4b2
commit 15ee6f0f15

View File

@ -311,7 +311,7 @@ class ModelResource(FormResource):
# Instantiate the ModelForm as appropriate
form_kwargs = {'data': data, 'files': files}
# Bound to an existing model instance
if issubclass(form, forms.ModelForm) and hasattr(self.view, 'model_instance'): form_kwargs['instance'] = self.view.model_instance
if hasattr(self.view, 'model_instance'): form_kwargs['instance'] = self.view.model_instance
return form(**form_kwargs)