toastdriven/django-tastypie — pull request #702 by glencoates (2012-10-21 06:56:19+00:00)
Title: Proper handling for ORM models that don't use AutoField for the PK

The commit message for 7d83e61 pretty much says it all, but this pull request addresses a broken core assumption in TastyPie namely, that a resource with a null `pk` value has not been saved previously (i.e. is a newly constructed model instance).

Any class that has a primary key with a non-null default will break this assumption, as I found out with our app in which all models use UUID PK models.