mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Fixed merge error parse error
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
6e0f8068b2
commit
31d49b5c9b
|
@ -120,15 +120,14 @@ 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');
|
||||
|
||||
$this->log('A matching department ' . $department_name . ' already exists');
|
||||
return $department->id;
|
||||
}
|
||||
|
||||
|
@ -137,15 +136,14 @@ class UserImporter extends ItemImporter
|
|||
$department->user_id = $this->user_id;
|
||||
|
||||
if ($department->save()) {
|
||||
$this->log('department '.$department_name.' was created');
|
||||
|
||||
$this->log('department ' . $department_name . ' was created');
|
||||
return $department->id;
|
||||
}
|
||||
|
||||
$this->logError($department, 'Department');
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public function sendWelcome($send = true)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue