mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-27 20:14:01 +03:00
Don't bork if request attribute is not set.
This commit is contained in:
parent
c124585df6
commit
11147ce13e
|
@ -180,7 +180,7 @@ class Serializer(object):
|
||||||
stack.append(obj)
|
stack.append(obj)
|
||||||
|
|
||||||
return related_serializer(depth=depth, stack=stack).serialize(
|
return related_serializer(depth=depth, stack=stack).serialize(
|
||||||
obj, request=self.request)
|
obj, request=getattr(self, 'request', None))
|
||||||
|
|
||||||
def serialize_max_depth(self, obj):
|
def serialize_max_depth(self, obj):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user