A free open source IT asset/license management system
Skip the magical user creation if it’s a location
snipec149885ceb07
diff --git a/app/Importer/ItemImporter.php b/app/Importer/ItemImporter.phpindex 7848ec6b85..f989457dc6 100644--- a/app/Importer/ItemImporter.php+++ b/app/Importer/ItemImporter.php@@ -60,8 +60,8 @@ class ItemImporter extends Importer$this->item['department_id'] = $this->createOrFetchDepartment($item_department);}- $item_manager_first_name = $this->findCsvMatch($row, 'manage_first_name');- $item_manager_last_name = $this->findCsvMatch($row, 'manage_last_name');+ $item_manager_first_name = $this->findCsvMatch($row, 'manager_first_name');+ $item_manager_last_name = $this->findCsvMatch($row, 'manager_last_name');if ($this->shouldUpdateField($item_manager_first_name)) {$this->item['manager_id'] = $this->fetchManager($item_manager_first_name, $item_manager_last_name);@@ -112,6 +112,10 @@ class ItemImporter extends Importerreturn $this->createOrFetchUser($row);}+ if (get_class($this) != LocationImporter::class) {+ return;+ }+if (strtolower($this->item['checkout_class']) === 'location' && $this->findCsvMatch($row, 'checkout_location') != null ) {return Location::findOrFail($this->createOrFetchLocation($this->findCsvMatch($row, 'checkout_location')));}