Fixes #11109: Fix nullification of custom object & multi-object fields via REST API

This commit is contained in:
jeremystretch
2022-12-13 14:48:40 -05:00
parent 96a796ebde
commit b9888d6f86
3 changed files with 14 additions and 1 deletions

View File

@@ -72,7 +72,7 @@ class CustomFieldsDataField(Field):
# Serialize object and multi-object values
for cf in self._get_custom_fields():
if cf.name in data and cf.type in (
if cf.name in data and data[cf.name] not in (None, []) and cf.type in (
CustomFieldTypeChoices.TYPE_OBJECT,
CustomFieldTypeChoices.TYPE_MULTIOBJECT
):