This commit is contained in:
Yuri Kuznetsov
2024-11-11 12:02:49 +02:00
parent 7130a3fb99
commit 72795d1a93
2 changed files with 16 additions and 12 deletions
+9 -4
View File
@@ -41,6 +41,7 @@ use Espo\Core\Utils\Log;
use Espo\ORM\EntityManager;
use Espo\ORM\Query\Part\Condition as Cond;
use Espo\ORM\Query\SelectBuilder;
use Exception;
use stdClass;
@@ -228,12 +229,16 @@ class Queue
$target = null;
if ($this->entityManager->hasRepository($targetType)) {
$query = SelectBuilder::create()
->from($targetType)
->withDeleted()
->build();
$target = $this->entityManager
->getRDBRepository($targetType)
->where([
'id' => $item->get('targetId')
])
->findOne(['withDeleted' => true]);
->clone($query)
->where(['id' => $item->get('targetId')])
->findOne();
}
if (!$target) {