django-rest-framework-bulk icon indicating copy to clipboard operation
django-rest-framework-bulk copied to clipboard

Fix BulkListSerializerObject is not iterable thing

Open liquidpele opened this issue 9 years ago • 4 comments

Fix for https://github.com/miki725/django-rest-framework-bulk/issues/33 by making the object iterable even though it doesn't actually iterate over anything. Everything seems to work still. Kind of hacky, but better than nasty 500 errors.

liquidpele avatar Jul 16 '15 03:07 liquidpele

@liquidpele thanks. I wonder if this can have any negative side-effects.

also build failed

miki725 avatar Jul 16 '15 13:07 miki725

No idea, seemed to work for me though. I don't have time to play with it more though, sorry.

liquidpele avatar Jul 16 '15 13:07 liquidpele

I am currently swamped at work however will try to take a look at this next week.

miki725 avatar Jul 31 '15 20:07 miki725

Just an FYI you might want to fix this a better way. I ended up implementing my own multi functionality in a viewset instead of the serializer, so I won't have the ability to help out. As a hint, I noticed I got the same error in my own implementation when I passed an object to the serializer (instead of a list) when I had many=True set for the serializer's definition. Hope that leads you to figuring it out... Cheers!

liquidpele avatar Aug 01 '15 05:08 liquidpele