fix import null related name

This commit is contained in:
Yuri Kuznetsov
2022-12-24 11:03:42 +02:00
parent 4a4766cb0b
commit e1eaeab938
+6 -2
View File
@@ -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() ?? '');
}