mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-23 15:54:16 +03:00
Merge branch 'master' into version-3.1
This commit is contained in:
commit
3fc441059d
|
@ -1112,7 +1112,7 @@ class ModelSerializer(Serializer):
|
|||
class NestedSerializer(ModelSerializer):
|
||||
class Meta:
|
||||
model = relation_info.related
|
||||
depth = nested_depth
|
||||
depth = nested_depth - 1
|
||||
|
||||
return NestedSerializer
|
||||
|
||||
|
@ -1139,6 +1139,6 @@ class HyperlinkedModelSerializer(ModelSerializer):
|
|||
class NestedSerializer(HyperlinkedModelSerializer):
|
||||
class Meta:
|
||||
model = relation_info.related
|
||||
depth = nested_depth
|
||||
depth = nested_depth - 1
|
||||
|
||||
return NestedSerializer
|
||||
|
|
Loading…
Reference in New Issue
Block a user