From 7736f6cd76b9eccae8fd313f6be709cc907ff708 Mon Sep 17 00:00:00 2001 From: yuri Date: Mon, 25 Jul 2016 17:07:14 +0300 Subject: [PATCH] fix email update --- application/Espo/Services/Email.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/application/Espo/Services/Email.php b/application/Espo/Services/Email.php index 2a6a9ab3ac..0ecc8fce76 100644 --- a/application/Espo/Services/Email.php +++ b/application/Espo/Services/Email.php @@ -704,7 +704,9 @@ class Email extends Record if ($entity->isManuallyArchived()) return; - $attributList = $entity; + if ($entity->get('status') === 'Draft') return; + + if ($entity->get('status') === 'Sending' && $entity->getFetched('status') === 'Draft') return; foreach ($entity->getAttributeList() as $attribute) { if (in_array($attribute, $this->allowedForUpdateAttributeList)) return;