toastdriven/django-tastypie — Issue #307: Updating a resource with a full ToManyField representation fails
Author: joshbohde
Created: 2011-12-01 04:01:03+00:00
State: open

As reported in #tastypie by @jpadilla, when sending a PUT to a resource with a ToManyField, the Django ORM aborts with the message `int() argument must be a string or a number, not 'ManyRelatedManager'`.

Reference resources are located in this gist: https://gist.github.com/5820c76971797bf799bc
A traceback is located here: https://gist.github.com/ea1afa28caf4859b2f26
The kwargs that are causing the issue are here: https://gist.github.com/adee82c997a3f872e005

The problem was found when piping the result of a `get_detail` on the BookingResource into a `put_detail`.