mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-27 20:14:01 +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:
|
else:
|
||||||
depth = self.depth - 1
|
depth = self.depth - 1
|
||||||
|
|
||||||
if any([obj is elem for elem in self.stack]):
|
if obj in self.stack:
|
||||||
return self.serialize_recursion(obj)
|
return self.serialize_recursion(obj)
|
||||||
else:
|
else:
|
||||||
stack = self.stack[:]
|
stack = self.stack[:]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user