mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-27 08:29:59 +03:00
extra fields
This commit is contained in:
parent
3522dc09a8
commit
2d9f6e14c8
|
@ -997,7 +997,7 @@ class ModelSerializer(Serializer):
|
||||||
# relationships as being a special case. During updates we already
|
# relationships as being a special case. During updates we already
|
||||||
# have an instance pk for the relationships to be associated with.
|
# have an instance pk for the relationships to be associated with.
|
||||||
m2m_fields = []
|
m2m_fields = []
|
||||||
update_fields = []
|
update_fields = [*api_settings.PARTIAL_UPDATE_EXTRA_FIELDS]
|
||||||
for attr, value in validated_data.items():
|
for attr, value in validated_data.items():
|
||||||
if attr in info.relations and info.relations[attr].to_many:
|
if attr in info.relations and info.relations[attr].to_many:
|
||||||
m2m_fields.append((attr, value))
|
m2m_fields.append((attr, value))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user