Make sure to check for "is not None" so that depth=0 gets assigned properly. Thanks thomasst.

This commit is contained in:
Tom Christie 2011-09-29 19:47:20 +02:00
parent b71a24437a
commit 249eb6f931

View File

@ -106,7 +106,8 @@ class Serializer(object):
def __init__(self, depth=None, stack=[], **kwargs):
self.depth = depth or self.depth
if depth is not None:
self.depth = depth
self.stack = stack