Fixed merge error parse error

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2021-10-20 18:11:34 -07:00
parent 6e0f8068b2
commit 31d49b5c9b

View file

@ -120,15 +120,14 @@ class UserImporter extends ItemImporter
*/ */
public function createOrFetchDepartment($department_name) public function createOrFetchDepartment($department_name)
{ {
if (is_null($department_name) || $department_name == ''){
return null; return null;
} }
$department = Department::where(['name' => $department_name])->first(); $department = Department::where(['name' => $department_name])->first();
if ($department) { if ($department) {
$this->log('A matching department '.$department_name.' already exists'); $this->log('A matching department ' . $department_name . ' already exists');
return $department->id; return $department->id;
} }
@ -137,15 +136,14 @@ class UserImporter extends ItemImporter
$department->user_id = $this->user_id; $department->user_id = $this->user_id;
if ($department->save()) { if ($department->save()) {
$this->log('department '.$department_name.' was created'); $this->log('department ' . $department_name . ' was created');
return $department->id; return $department->id;
} }
$this->logError($department, 'Department'); $this->logError($department, 'Department');
return null; return null;
} }
public function sendWelcome($send = true) public function sendWelcome($send = true)
{ {