aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework
diff options
context:
space:
mode:
authorTom Christie2014-12-19 14:53:10 +0000
committerTom Christie2014-12-19 14:53:10 +0000
commit3fc441059d844f24a3482cd8da9153f2d64b0221 (patch)
tree580e885585719a52ebd04e1e6e7402a7fbc1c67c /rest_framework
parent435aef77384759d5a29129cdb0cbe47b3de6df93 (diff)
parent80bacc5fb00682b589b3280c7082af73e3aaa8f8 (diff)
downloaddjango-rest-framework-3fc441059d844f24a3482cd8da9153f2d64b0221.tar.bz2
Merge branch 'master' into version-3.1
Diffstat (limited to 'rest_framework')
-rw-r--r--rest_framework/serializers.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/rest_framework/serializers.py b/rest_framework/serializers.py
index ed709d84..6f89df0d 100644
--- a/rest_framework/serializers.py
+++ b/rest_framework/serializers.py
@@ -1112,7 +1112,7 @@ class ModelSerializer(Serializer):
class NestedSerializer(ModelSerializer):
class Meta:
model = relation_info.related
- depth = nested_depth
+ depth = nested_depth - 1
return NestedSerializer
@@ -1139,6 +1139,6 @@ class HyperlinkedModelSerializer(ModelSerializer):
class NestedSerializer(HyperlinkedModelSerializer):
class Meta:
model = relation_info.related
- depth = nested_depth
+ depth = nested_depth - 1
return NestedSerializer