From 9bb3a243a179e25ae4b0ba13e772c45d83138811 Mon Sep 17 00:00:00 2001 From: Reece Date: Wed, 15 Jul 2015 23:02:07 -0400 Subject: [PATCH] Fix 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. --- rest_framework_bulk/drf3/serializers.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rest_framework_bulk/drf3/serializers.py b/rest_framework_bulk/drf3/serializers.py index 31fff46..1d18ce0 100644 --- a/rest_framework_bulk/drf3/serializers.py +++ b/rest_framework_bulk/drf3/serializers.py @@ -68,3 +68,10 @@ def update(self, queryset, all_validated_data): updated_objects.append(self.child.update(obj, obj_validated_data)) return updated_objects + + def __iter__(self): + return self + + def next(self): + raise StopIteration +