import: support null for update

This commit is contained in:
Yuri Kuznetsov
2024-12-02 17:15:19 +02:00
parent 7b65f1b3dc
commit 1951ac4e8e
+6 -2
View File
@@ -753,7 +753,7 @@ class Import
}
}
if ($value === '' && $attributeType !== Entity::BOOL) {
if ($value === '' && $attributeType !== Entity::BOOL && $entity->isNew()) {
return;
}
@@ -793,10 +793,14 @@ class Import
$type = $entity->getAttributeType($attribute);
if ($type !== Entity::BOOL && strtolower($value) === 'null') {
if ($type !== Entity::BOOL && $value === '') {
return null;
}
/*if ($type !== Entity::BOOL && strtolower($value) === 'null') {
return null;
}*/
$fieldDefs = $this->entityManager
->getDefs()
->getEntity($entity->getEntityType())