mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 09:36:49 +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 Meta:
|
||||
model = relation_info.related_model
|
||||
depth = nested_depth
|
||||
depth = nested_depth - 1
|
||||
|
||||
field_class = NestedSerializer
|
||||
field_kwargs = get_nested_relation_kwargs(relation_info)
|
||||
|
|
Loading…
Reference in New Issue
Block a user