toastdriven/django-tastypie — pull request #418 by ipmb (2012-03-24 05:13:54+00:00)
Title: Error creating required foreign key objects on obj_create

See the associated test for an example of how to trigger the error. I made a small change to get all the tests to pass, but I don't think it's the right one.

It seems like reverse relations (`ToManyField`s with `related_name`) should be handled in `save_m2m` when you are sure the bundle object has a `pk`, instead of in `save_related` when the bundle object might not have been saved yet.