mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-30 13:34:00 +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)
|
||||
|
||||
return related_serializer(depth=depth, stack=stack).serialize(
|
||||
obj, request=self.request)
|
||||
obj, request=getattr(self, 'request', None))
|
||||
|
||||
def serialize_max_depth(self, obj):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user