From f95cbe4ed2b9ffcb644eaf7976a90179f6f7dd38 Mon Sep 17 00:00:00 2001 From: yuri Date: Wed, 24 Jan 2018 15:05:17 +0200 Subject: [PATCH] fix email replate to email account --- application/Espo/Services/EmailAccount.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/Espo/Services/EmailAccount.php b/application/Espo/Services/EmailAccount.php index 5a3c322558..475f510a39 100644 --- a/application/Espo/Services/EmailAccount.php +++ b/application/Espo/Services/EmailAccount.php @@ -320,8 +320,8 @@ class EmailAccount extends Record } if (!empty($email)) { + $this->getEntityManager()->getRepository('EmailAccount')->relate($emailAccount, 'emails', $email); if (!$email->isFetched()) { - $this->getEntityManager()->getRepository('EmailAccount')->relate($emailAccount, 'emails', $email); $this->noteAboutEmail($email); } }