Merge pull request #11854 from inietov/fixes/location_issue_during_import

Fixed #11847 404 error during Import if a checkout type of location is specified and no checkout location is passed
This commit is contained in:
snipe 2022-09-27 14:34:26 -07:00 committed by GitHub
commit a7b83fc531
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -112,7 +112,7 @@ class ItemImporter extends Importer
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')));
}