From 5c00a7ad43f44ffc40fc3e5db7499e89e1cc1ada Mon Sep 17 00:00:00 2001 From: yuri Date: Mon, 19 Aug 2019 11:44:25 +0300 Subject: [PATCH] fix email fitler duplicate --- application/Espo/Services/EmailFilter.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/application/Espo/Services/EmailFilter.php b/application/Espo/Services/EmailFilter.php index bc3f9dea7f..00ea52cfea 100644 --- a/application/Espo/Services/EmailFilter.php +++ b/application/Espo/Services/EmailFilter.php @@ -41,5 +41,10 @@ class EmailFilter extends Record if (!$this->getAcl()->check($entity, 'edit')) { throw new Forbidden(); } + + if ($entity->get('isGlobal')) { + $entity->set('parentId', null); + $entity->set('parentType', null); + } } }