From 1951ac4e8eae24ab75ecd5db123b7ecb478c72d4 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Mon, 2 Dec 2024 17:15:19 +0200 Subject: [PATCH] import: support null for update --- application/Espo/Tools/Import/Import.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/application/Espo/Tools/Import/Import.php b/application/Espo/Tools/Import/Import.php index 9a62d8d975..ff121b0a27 100644 --- a/application/Espo/Tools/Import/Import.php +++ b/application/Espo/Tools/Import/Import.php @@ -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())