From e267f5491aa9e818d0c1d7a3c2ced712c691d05e Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Mon, 19 Sep 2022 19:05:48 -0500 Subject: [PATCH] Adds a check for empty location values on import --- app/Importer/ItemImporter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Importer/ItemImporter.php b/app/Importer/ItemImporter.php index f015de04d9..d332200368 100644 --- a/app/Importer/ItemImporter.php +++ b/app/Importer/ItemImporter.php @@ -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'))); }