wlanslovenija / django-tastypie-mongoengine

MongoEngine support for django-tastypie.
Other
73 stars 59 forks source link

AssertionError: delete:{ ... request.body ... } #91

Open pitervergara opened 9 years ago

pitervergara commented 9 years ago

I'am getting an AssertionError on DELETE calls. Looks like tastypie-mongoengine expects that delete requests has no request.body. This stack overflow discussion sugests that this is not mandatory. I'm using restangular, so I managed to avoid the error by means of this comment, but I suppose it worth to register... If I use 'pure tastypie' (with sqlite) the same DELETE requests work (I've just test it to be sure)

The stacktrace is: File ".../lib/python2.7/site-packages/tastypie_mongoengine/resources.py", line 428, in dispatch assert the_method in ('put', 'post', 'patch'), the_method + ":" + request.body

mgoffin commented 9 years ago

I am seeing the same problem all of the sudden for POST and PATCH.

http://stackoverflow.com/questions/29681579/django-tastypie-and-django-tastypie-mongoengine-patch-error