mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-23 22:49:50 +03:00
Set set_value
as an object (non-static) method
This commit is contained in:
parent
17fb350d3f
commit
dcbdb7158c
|
@ -337,8 +337,7 @@ class Serializer(BaseSerializer, metaclass=SerializerMetaclass):
|
|||
'invalid': _('Invalid data. Expected a dictionary, but got {datatype}.')
|
||||
}
|
||||
|
||||
@staticmethod
|
||||
def set_value(dictionary, keys, value):
|
||||
def set_value(self, dictionary, keys, value):
|
||||
"""
|
||||
Similar to Python's built in `dictionary[key] = value`,
|
||||
but takes a list of nested keys instead of a single key.
|
||||
|
|
Loading…
Reference in New Issue
Block a user