chore: Refactor Service.php to handle missing admin user in extraFields() method
This commit is contained in:
parent
0008f44255
commit
32ff346154
@ -450,6 +450,7 @@ public function extraFields()
|
||||
$data = collect([]);
|
||||
$admin_user = $this->environment_variables()->where('key', 'SERVICE_USER_ADMIN')->first();
|
||||
$admin_password = $this->environment_variables()->where('key', 'SERVICE_PASSWORD_ADMIN')->first();
|
||||
if ($admin_user) {
|
||||
$data = $data->merge([
|
||||
'User' => [
|
||||
'key' => 'SERVICE_USER_ADMIN',
|
||||
@ -458,6 +459,7 @@ public function extraFields()
|
||||
'rules' => 'required',
|
||||
],
|
||||
]);
|
||||
}
|
||||
if ($admin_password) {
|
||||
$data = $data->merge([
|
||||
'Password' => [
|
||||
|
Loading…
Reference in New Issue
Block a user