aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/serializer.py
diff options
context:
space:
mode:
authorTom Christie2012-09-19 08:17:28 -0700
committerTom Christie2012-09-19 08:17:28 -0700
commit8d92f77fc2767c0572be480300f1bf71af2e4ec5 (patch)
treeb2a9b319eaa8f976bcea3d74324c162fd2234e43 /djangorestframework/serializer.py
parent0fc5a49a114ca65aab90dcf039da1569dde3c499 (diff)
parent943bc073d986b1d5bc10c6d17d3601d4311c3681 (diff)
downloaddjango-rest-framework-8d92f77fc2767c0572be480300f1bf71af2e4ec5.tar.bz2
Merge pull request #268 from phobologic/master
Stop backwards recursion with reverse relationships
Diffstat (limited to 'djangorestframework/serializer.py')
-rw-r--r--djangorestframework/serializer.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/djangorestframework/serializer.py b/djangorestframework/serializer.py
index 3f05903b..5d77c461 100644
--- a/djangorestframework/serializer.py
+++ b/djangorestframework/serializer.py
@@ -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[:]