diff --git a/application/Espo/Tools/Import/Import.php b/application/Espo/Tools/Import/Import.php index a842fa9aaa..546c74bece 100644 --- a/application/Espo/Tools/Import/Import.php +++ b/application/Espo/Tools/Import/Import.php @@ -630,6 +630,12 @@ class Import private function processForeignName(CoreEntity $entity, string $attribute): void { + $nameValue = $entity->get($attribute); + + if ($nameValue === null) { + return; + } + $relation = $entity->getAttributeParam($attribute, 'relation'); if (!$relation) { @@ -671,8 +677,6 @@ class Import return; } - $nameValue = $entity->get($attribute); - if ($isPerson) { $where = $this->parsePersonName($nameValue, $this->params->getPersonNameFormat() ?? ''); }