waveaccounting/django-tastypie — pull request #1 by mkwietniewski (2012-10-24 19:36:08+00:00)
Title: Properly check if model instance's pk is set

FormValidation is checking presence of pk attibute to determine if we are editing an existing model instance.
As per
https://docs.djangoproject.com/en/dev/ref/models/instances/?from=olddocs#how-django-knows-to-update-vs-insert
One should check if obj.pk evaluates to True.