fix import null related name
This commit is contained in:
@@ -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() ?? '');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user