mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-16 11:12:21 +03:00
small rewrite
This commit is contained in:
parent
bcbd26d32e
commit
5a69db0f91
|
@ -151,8 +151,7 @@ class BaseSerializer(Field):
|
|||
value = kwargs.pop(key, None)
|
||||
if value is not None:
|
||||
list_kwargs[key] = value
|
||||
child_serializer = cls(*args, **kwargs)
|
||||
list_kwargs['child'] = child_serializer
|
||||
list_kwargs['child'] = cls(*args, **kwargs)
|
||||
list_kwargs.update({
|
||||
key: value for key, value in kwargs.items()
|
||||
if key in LIST_SERIALIZER_KWARGS
|
||||
|
|
Loading…
Reference in New Issue
Block a user