email performance improvement

This commit is contained in:
yuri
2017-03-01 12:07:52 +02:00
parent 11a9e2ab9c
commit e6f6e0fcf1
+1 -1
View File
@@ -283,7 +283,7 @@ class Email extends Record
$this->prepareEntityForOutput($entity);
}
if (!empty($entity) && !empty($id)) {
if (!empty($entity) && !empty($id) && !$entity->get('isRead')) {
$this->markAsRead($entity->id);
}
return $entity;