diff options
| author | Tom Christie | 2011-09-29 19:47:20 +0200 |
|---|---|---|
| committer | Tom Christie | 2011-09-29 19:47:20 +0200 |
| commit | 249eb6f931e88e06339dbb5cdbd3e82630f20c0d (patch) | |
| tree | c40cd7e0f531acd0689fa4f814ef09ba8d5a32e1 /djangorestframework/serializer.py | |
| parent | b71a24437a3504b3edf19153576d5a2e92c84bd2 (diff) | |
| download | django-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.py | 3 |
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 |
