aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/serializer.py
diff options
context:
space:
mode:
Diffstat (limited to 'djangorestframework/serializer.py')
-rw-r--r--djangorestframework/serializer.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/djangorestframework/serializer.py b/djangorestframework/serializer.py
index 22efa5ed..55b84df1 100644
--- a/djangorestframework/serializer.py
+++ b/djangorestframework/serializer.py
@@ -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