From ee7ce8221daaa3c12cee281b3d63776edfc67f15 Mon Sep 17 00:00:00 2001 From: yuri Date: Mon, 25 Feb 2019 11:50:39 +0200 Subject: [PATCH] fix rdb --- application/Espo/Core/ORM/Repositories/RDB.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/application/Espo/Core/ORM/Repositories/RDB.php b/application/Espo/Core/ORM/Repositories/RDB.php index 29f5e3c087..bf323ee574 100644 --- a/application/Espo/Core/ORM/Repositories/RDB.php +++ b/application/Espo/Core/ORM/Repositories/RDB.php @@ -175,7 +175,9 @@ class RDB extends \Espo\ORM\Repositories\RDB implements Injectable $entity->set('modifiedAt', $nowString); } if ($entity->hasAttribute('modifiedById')) { - $entity->set('modifiedById', $this->getEntityManager()->getUser()->id); + if ($this->getEntityManager()->getUser()) { + $entity->set('modifiedById', $this->getEntityManager()->getUser()->id); + } } }