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;