From 4f16c6dfbc7ac288952bb340f6886b33a0b5ad14 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 27 May 2023 03:06:45 +0000 Subject: [PATCH] rector fixes + bug fixes --- Controller/CliController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Controller/CliController.php b/Controller/CliController.php index 5e4cb9d..31490e5 100755 --- a/Controller/CliController.php +++ b/Controller/CliController.php @@ -68,7 +68,7 @@ final class CliController extends Controller } $count = 0; - if ($first->id > 0) { + if ($first->id > 0 && $first->blockchain === null) { /** @var \Modules\Auditor\Models\Audit $last */ $last = AuditMapper::get() ->sort('id', OrderType::DESC) @@ -83,7 +83,7 @@ final class CliController extends Controller $current = $first; $endLastBatchId = $first->id - 1; - while ($current->id !== 0 && $current->id <= $last->id) { + while ($current->id !== 0 && $current->id < $last->id) { /** @var \Modules\Auditor\Models\Audit[] $batch */ $batch = AuditMapper::getAll() ->where('id', $endLastBatchId, '>')