Set hasEmptyOption
continuous-integration/drone/tag Build was killed Details
continuous-integration/drone/push Build was killed Details

This commit is contained in:
philipp lang 2024-04-18 18:55:26 +02:00
parent fd1e0bb9e1
commit daca017d96
1 changed files with 4 additions and 4 deletions

View File

@ -19,8 +19,8 @@ return new class extends Migration
/** @var Collection<int, mixed> */
$fields = $section->fields;
$section->fields = collect($fields)->map(function ($field) {
if ($field->type === 'DropdownField' || $field->type === 'RadioField') {
$field->allowcustom = false;
if ($field->type === 'GroupField') {
$field->hasEmptyOption = false;
}
return $field;
})->all();
@ -36,8 +36,8 @@ return new class extends Migration
/** @var Collection<int, mixed> */
$fields = $section->fields;
$section->fields = collect($fields)->map(function ($field) {
if ($field->type === 'DropdownField' || $field->type === 'RadioField') {
$field->allowcustom = false;
if ($field->type === 'GroupField') {
$field->hasEmptyOption = false;
}
return $field;
})->all();