Commit 2eb9107b by Tom Christie

Merge pull request #2798 from Boomerangz/depth-should-reduce

Depth should reduce on nested ModelSerializer classes.
parents 2394577d 2d5b4f4c
......@@ -1038,7 +1038,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)
......
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