Fix for user creation
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 38s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m51s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s

This commit is contained in:
Deon George 2024-06-04 19:21:38 +10:00
parent 6994758732
commit e7821d4c80

View File

@ -21,7 +21,7 @@ class UserRequest extends FormRequest
$o = $this->route('o');
return [
'email' => 'required|email|unique:users,email,'.($o->exists ? $o->id : 0),
'email' => 'required|email|unique:users,email,'.($o?->exists ? $o->id : 0),
'name' => 'required|min:3',
'pgp_pubkey' => [
'nullable',
@ -33,7 +33,7 @@ class UserRequest extends FormRequest
'admin' => 'required|boolean',
'system_id' => [
'nullable',
Rule::in($o->systems->pluck('id')),
Rule::in($o?->systems->pluck('id')),
],
];
}