Depth should reduce

Depth should reduce
This commit is contained in:
Igor Zygin 2015-04-06 10:13:25 +06:00
parent 2e6d39dbae
commit 2d5b4f4cc9

View File

@ -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)