extra fields

This commit is contained in:
Christian 2022-05-17 21:57:27 +01:00 committed by GitHub
parent 3522dc09a8
commit 2d9f6e14c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -997,7 +997,7 @@ class ModelSerializer(Serializer):
# relationships as being a special case. During updates we already
# have an instance pk for the relationships to be associated with.
m2m_fields = []
update_fields = []
update_fields = [*api_settings.PARTIAL_UPDATE_EXTRA_FIELDS]
for attr, value in validated_data.items():
if attr in info.relations and info.relations[attr].to_many:
m2m_fields.append((attr, value))