mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-17 19:52:25 +03:00
insert child
This commit is contained in:
parent
094521c8d8
commit
bcbd26d32e
|
@ -152,9 +152,7 @@ class BaseSerializer(Field):
|
||||||
if value is not None:
|
if value is not None:
|
||||||
list_kwargs[key] = value
|
list_kwargs[key] = value
|
||||||
child_serializer = cls(*args, **kwargs)
|
child_serializer = cls(*args, **kwargs)
|
||||||
list_kwargs = {
|
list_kwargs['child'] = child_serializer
|
||||||
'child': child_serializer,
|
|
||||||
}
|
|
||||||
list_kwargs.update({
|
list_kwargs.update({
|
||||||
key: value for key, value in kwargs.items()
|
key: value for key, value in kwargs.items()
|
||||||
if key in LIST_SERIALIZER_KWARGS
|
if key in LIST_SERIALIZER_KWARGS
|
||||||
|
|
Loading…
Reference in New Issue
Block a user