mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 17:47:04 +03:00
Depth should reduce
Depth should reduce
This commit is contained in:
parent
2e6d39dbae
commit
2d5b4f4cc9
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user