Commit f3834aa2 by Michael Barrett

Stop serialization from going back to base object

Without this patch the base object will be recursed back into with each
related object at least once.
parent 943bc073
......@@ -210,6 +210,9 @@ class Serializer(object):
Given a model instance or dict, serialize it to a dict..
"""
data = {}
# Append the instance itself to the stack so that you never iterate
# back into the first object.
self.stack.append(instance)
fields = self.get_fields(instance)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment