diff --git a/application/Espo/Services/Record.php b/application/Espo/Services/Record.php index a87680996f..b600c2a3c7 100644 --- a/application/Espo/Services/Record.php +++ b/application/Espo/Services/Record.php @@ -1254,8 +1254,12 @@ class Record extends \Espo\Core\Services\Base return false; } - public function checkEntityForDuplicate(Entity $entity, $data) + public function checkEntityForDuplicate(Entity $entity, $data = null) { + if (!$data) { + $data = (object) []; + } + $where = $this->getDuplicateWhereClause($entity, $data); if ($where) {