mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-24 04:03:34 -08:00
Skip the magical user creation if it’s a location
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
1509672463
commit
c149885ceb
|
@ -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 Importer
|
|||
return $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')));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue