From b660353ddec134e86a24be73910d6d74f58f2b51 Mon Sep 17 00:00:00 2001 From: michele Date: Mon, 3 Aug 2026 14:13:17 +0200 Subject: [PATCH] fix(ops): prevent automatic wipe of Stabile 0021 data without explicit reset-temp flag --- app/Console/Commands/ImportGesconFullPipeline.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Console/Commands/ImportGesconFullPipeline.php b/app/Console/Commands/ImportGesconFullPipeline.php index ff8c511..0668aba 100755 --- a/app/Console/Commands/ImportGesconFullPipeline.php +++ b/app/Console/Commands/ImportGesconFullPipeline.php @@ -435,7 +435,7 @@ public function handle(): int $this->purgeAuthoritativeLegacyReplica($steps); } - if ($this->option('stabile') === '0021' && ! $dry && in_array('unita', $steps, true)) { + if ($this->option('stabile') === '0021' && ! $this->option('update-only') && $this->option('reset-temp') && ! $dry && in_array('unita', $steps, true)) { $this->line('⚠️ DIRETTIVA DI LIVELLO 3: Azzeramento dati Stabile 0021'); $stabileId = 4; $unitaIds = DB::table('unita_immobiliari')->where('stabile_id', $stabileId)->pluck('id')->toArray();