Applies PR #10150 to master

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2021-09-30 15:33:00 -07:00
parent 8e437a66af
commit d0acb9fdb4

View file

@ -121,6 +121,11 @@ class UserImporter extends ItemImporter
*/
public function createOrFetchDepartment($department_name)
{
if (is_null($department_name) || $department_name == ''){
return null;
}
$department = Department::where(['name' => $department_name])->first();
if ($department) {
$this->log('A matching department ' . $department_name . ' already exists');