Adds a check for empty location values on import

This commit is contained in:
Ivan Nieto Vivanco 2022-09-19 19:05:48 -05:00
parent 9369165007
commit e267f5491a

View file

@ -112,7 +112,7 @@ class ItemImporter extends Importer
return $this->createOrFetchUser($row); return $this->createOrFetchUser($row);
} }
if (strtolower($this->item['checkout_class']) === 'location') { if (strtolower($this->item['checkout_class']) === 'location' && $this->findCsvMatch($row, 'checkout_location') != null ) {
return Location::findOrFail($this->createOrFetchLocation($this->findCsvMatch($row, 'checkout_location'))); return Location::findOrFail($this->createOrFetchLocation($this->findCsvMatch($row, 'checkout_location')));
} }