mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-11 12:17:24 +03:00
Merge pull request #268 from phobologic/master
Stop backwards recursion with reverse relationships
This commit is contained in:
commit
8d92f77fc2
|
@ -182,7 +182,7 @@ class Serializer(object):
|
|||
else:
|
||||
depth = self.depth - 1
|
||||
|
||||
if any([obj is elem for elem in self.stack]):
|
||||
if obj in self.stack:
|
||||
return self.serialize_recursion(obj)
|
||||
else:
|
||||
stack = self.stack[:]
|
||||
|
|
Loading…
Reference in New Issue
Block a user