Updated skip logic if plant not found
This commit is contained in:
@@ -39,6 +39,9 @@ class LineImporter extends Importer
|
||||
public function resolveRecord(): ?Line
|
||||
{
|
||||
$plant = \App\Models\Plant::where('name', $this->data['plant'])->first();
|
||||
if (!$plant) {
|
||||
return null;
|
||||
}
|
||||
return Line::updateOrCreate([
|
||||
'name' => $this->data['name'],
|
||||
'plant_id' => $plant->id
|
||||
|
||||
Reference in New Issue
Block a user