From 2d5b4f4cc9a2443a5302a6379d61f87e74bdde94 Mon Sep 17 00:00:00 2001 From: Igor Zygin Date: Mon, 6 Apr 2015 10:13:25 +0600 Subject: [PATCH] Depth should reduce Depth should reduce --- rest_framework/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework/serializers.py b/rest_framework/serializers.py index 2eef6eeb5..850dd23fe 100644 --- a/rest_framework/serializers.py +++ b/rest_framework/serializers.py @@ -1034,7 +1034,7 @@ class ModelSerializer(Serializer): class NestedSerializer(ModelSerializer): class Meta: model = relation_info.related_model - depth = nested_depth + depth = nested_depth - 1 field_class = NestedSerializer field_kwargs = get_nested_relation_kwargs(relation_info)