diff --git a/rest_framework/serializers.py b/rest_framework/serializers.py index 2eef6eeb51..850dd23fe1 100644 --- a/rest_framework/serializers.py +++ b/rest_framework/serializers.py @@ -1034,7 +1034,7 @@ def build_nested_field(self, field_name, relation_info, nested_depth): 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)