Don't bork if request attribute is not set.

This commit is contained in:
Tom Christie 2012-06-28 14:16:30 +02:00
parent c124585df6
commit 11147ce13e

View File

@ -180,7 +180,7 @@ class Serializer(object):
stack.append(obj)
return related_serializer(depth=depth, stack=stack).serialize(
obj, request=self.request)
obj, request=getattr(self, 'request', None))
def serialize_max_depth(self, obj):
"""