Commit 2d5b4f4c by Igor Zygin

Depth should reduce

Depth should reduce
parent 2e6d39db
...@@ -1034,7 +1034,7 @@ class ModelSerializer(Serializer): ...@@ -1034,7 +1034,7 @@ class ModelSerializer(Serializer):
class NestedSerializer(ModelSerializer): class NestedSerializer(ModelSerializer):
class Meta: class Meta:
model = relation_info.related_model model = relation_info.related_model
depth = nested_depth depth = nested_depth - 1
field_class = NestedSerializer field_class = NestedSerializer
field_kwargs = get_nested_relation_kwargs(relation_info) field_kwargs = get_nested_relation_kwargs(relation_info)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment