python3.4 compatibility

This commit is contained in:
Laura Klünder 2016-10-06 17:53:38 +02:00
parent 7ea4a1bd21
commit 742bd3cce0

View file

@ -43,4 +43,4 @@ class RecursiveSerializerMixin(serializers.Serializer):
def recursive_value(self, serializer, obj, *args, **kwargs):
if self.context.get('sparse'):
return PkField().to_representation(obj)
return serializer(obj, *args, **kwargs, context=self.sparse_context()).data
return serializer(obj, context=self.sparse_context(), *args, **kwargs).data