aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/serializer.py
diff options
context:
space:
mode:
authorTom Christie2011-09-29 19:47:20 +0200
committerTom Christie2011-09-29 19:47:20 +0200
commit249eb6f931e88e06339dbb5cdbd3e82630f20c0d (patch)
treec40cd7e0f531acd0689fa4f814ef09ba8d5a32e1 /djangorestframework/serializer.py
parentb71a24437a3504b3edf19153576d5a2e92c84bd2 (diff)
downloaddjango-rest-framework-249eb6f931e88e06339dbb5cdbd3e82630f20c0d.tar.bz2
Make sure to check for "is not None" so that depth=0 gets assigned properly. Thanks thomasst.
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