diff --git a/app/Filament/Imports/ItemImporter.php b/app/Filament/Imports/ItemImporter.php index 53b0b4bf..99fd00c1 100644 --- a/app/Filament/Imports/ItemImporter.php +++ b/app/Filament/Imports/ItemImporter.php @@ -84,10 +84,12 @@ class ItemImporter extends Importer } } - $lineId = Line::where('plant_id',$plant->id)->where('name', $lineName)->first(); + if(!empty($lineName)){ + $lineId = Line::where('plant_id',$plant->id)->where('name', $lineName)->first(); - if (! $lineId) { - $warnMsg[] = 'Line name not found'; // '" . $plantCod . "' + if (! $lineId) { + $warnMsg[] = 'Line name not found'; // '" . $plantCod . "' + } } if (Str::length($iCode) < 6 || ! ctype_alnum($iCode)) {