From 1997da434349a9639746af492d52fb51fcf45d48 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Thu, 4 Nov 2021 17:22:56 +0200 Subject: [PATCH] fixes --- application/Espo/Tools/EntityManager/EntityManager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/Espo/Tools/EntityManager/EntityManager.php b/application/Espo/Tools/EntityManager/EntityManager.php index 5ed72c5c89..88270370a8 100644 --- a/application/Espo/Tools/EntityManager/EntityManager.php +++ b/application/Espo/Tools/EntityManager/EntityManager.php @@ -250,7 +250,7 @@ class EntityManager $serviceFactory = $this->serviceFactory; - if ($serviceFactory && $serviceFactory->checkExists($name)) { + if ($serviceFactory->checkExists($name)) { throw new Conflict('Entity name \''.$name.'\' is not allowed.'); } @@ -1249,7 +1249,7 @@ class EntityManager if ($linkType === 'childrenToParent') { $foreignLinkEntityTypeList = $params['foreignLinkEntityTypeList'] ?? null; - if ($linkForeign && is_array($foreignLinkEntityTypeList)) { + if (is_array($foreignLinkEntityTypeList)) { $this->updateParentForeignLinks($entity, $link, $linkForeign, $foreignLinkEntityTypeList); } }