mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-29 08:34:45 +02:00
Fix saving servers when egg variable is blank
closes https://github.com/pelican-dev/panel/issues/201
This commit is contained in:
parent
f7e7864dfe
commit
4f176c47d2
@ -246,6 +246,15 @@ class EditServer extends EditRecord
|
||||
Forms\Components\Repeater::make('server_variables')
|
||||
->relationship('serverVariables')
|
||||
->grid()
|
||||
->mutateRelationshipDataBeforeSaveUsing(function (array &$data): array {
|
||||
foreach ($data as $key => $value) {
|
||||
if (!isset($data['variable_value'])) {
|
||||
$data['variable_value'] = '';
|
||||
}
|
||||
}
|
||||
|
||||
return $data;
|
||||
})
|
||||
->reorderable(false)->addable(false)->deletable(false)
|
||||
->schema(function () {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user