From 5dc79086b703e35c40df2827f8568aec40bd4b78 Mon Sep 17 00:00:00 2001 From: yuri Date: Thu, 26 Jan 2017 10:54:04 +0200 Subject: [PATCH] fix attachment --- application/Espo/Services/Attachment.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/application/Espo/Services/Attachment.php b/application/Espo/Services/Attachment.php index 5b71c2924a..b64562972b 100644 --- a/application/Espo/Services/Attachment.php +++ b/application/Espo/Services/Attachment.php @@ -43,6 +43,10 @@ class Attachment extends Record $entity = parent::createEntity($data); + if (!empty($data['file'])) { + $entity->clear('contents'); + } + return $entity; } }