API doesn't allow null manager_id

This commit is contained in:
Lee Pryor 2021-02-01 12:48:59 +10:00
parent 8214d8db99
commit 529da8297b

View file

@ -107,13 +107,14 @@ function New-User() {
company_id = $company_id
location_id = $location_id
department_id = $department_id
manager_id = $manager_id
jobtitle = $jobTitle
employee_num = $employee_num
notes = "Imported using SnipeitPS Script"
activated = 1
}
if ($manager_id) {$Values.manager_id = $manager_id}
if ($ldap_user -eq $false) {
$ldap = @{
password = $password