Make the APU return null instead of blank

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2022-10-05 17:01:04 -07:00
parent 3605aa8f5a
commit 9d641573b5

View file

@ -30,7 +30,7 @@ class UsersTransformer
'username' => e($user->username), 'username' => e($user->username),
'remote' => ($user->remote == '1') ? true : false, 'remote' => ($user->remote == '1') ? true : false,
'locale' => ($user->locale) ? e($user->locale) : null, 'locale' => ($user->locale) ? e($user->locale) : null,
'employee_num' => e($user->employee_num), 'employee_num' => ($user->employee_num) ? e($user->employee_num) : null,
'manager' => ($user->manager) ? [ 'manager' => ($user->manager) ? [
'id' => (int) $user->manager->id, 'id' => (int) $user->manager->id,
'name'=> e($user->manager->first_name).' '.e($user->manager->last_name), 'name'=> e($user->manager->first_name).' '.e($user->manager->last_name),
@ -43,7 +43,7 @@ class UsersTransformer
'state' => ($user->state) ? e($user->state) : null, 'state' => ($user->state) ? e($user->state) : null,
'country' => ($user->country) ? e($user->country) : null, 'country' => ($user->country) ? e($user->country) : null,
'zip' => ($user->zip) ? e($user->zip) : null, 'zip' => ($user->zip) ? e($user->zip) : null,
'email' => e($user->email), 'email' => ($user->email) ? e($user->email) : null,
'department' => ($user->department) ? [ 'department' => ($user->department) ? [
'id' => (int) $user->department->id, 'id' => (int) $user->department->id,
'name'=> e($user->department->name), 'name'=> e($user->department->name),