mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 09:36:49 +03:00
Make sure to check for "is not None" so that depth=0 gets assigned properly. Thanks thomasst.
This commit is contained in:
parent
b71a24437a
commit
249eb6f931
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user