From 7e19ec294f2c43ce09b19cc91439e8fd128e6e4b Mon Sep 17 00:00:00 2001 From: amirghasempoor Date: Wed, 11 Dec 2024 10:41:08 +0330 Subject: [PATCH] debug the command --- app/Console/Commands/GetMachinesInfoListCommand.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Console/Commands/GetMachinesInfoListCommand.php b/app/Console/Commands/GetMachinesInfoListCommand.php index d37738d0..fc997c6a 100644 --- a/app/Console/Commands/GetMachinesInfoListCommand.php +++ b/app/Console/Commands/GetMachinesInfoListCommand.php @@ -45,13 +45,13 @@ class GetMachinesInfoListCommand extends Command 'machine_code' => $entry['MachineCode'], ], [ - 'car_name' => $entry['CarName'] ?? null, - 'car_group' => $entry['CarGroup'], + 'car_name' => $entry['CarName'] == [] ? null : $entry['CarName'], + 'car_group' => $entry['CarGroup'] == [] ? null : $entry['CarGroup'], 'machine_code' => $entry['MachineCode'], 'unit_name' => $entry['UnitName'], 'car_status' => $entry['Status'], 'car_id' => $entry['Id'], - 'unit_group' => $entry['UnitGroup'], + 'unit_group' => $entry['UnitGroup'] == [] ? null : $entry['UnitGroup'], 'plak_number' => $entry['PlakNumber'] ?? null, ]); $updatedRows += 1;