toastdriven/django-tastypie — pull request #314 by aaronelliotross (2011-12-13 17:01:12+00:00)
Title: Fix for validation and updates on existing model resources

Calls to put_detail on a ModelResource may fail validation when using Django's ModelForms. Django's ModelForm requires that updates pass the existing instance to the Form as the instance parameter.

This commit updates is_valid in the Validation classes to expect an instance parameter, and moves the calls to is_valid down the stack to obj_create and obj_update. obj_update already has the existing resource and can pass it along.

Thanks!