Revert "Set hasEmptyOption"

This reverts commit daca017d96.
This commit is contained in:
philipp lang 2024-04-18 18:59:58 +02:00
parent daca017d96
commit 85560ebec2
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 === 'GroupField') {
$field->hasEmptyOption = false;
if ($field->type === 'DropdownField' || $field->type === 'RadioField') {
$field->allowcustom = 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 === 'GroupField') {
$field->hasEmptyOption = false;
if ($field->type === 'DropdownField' || $field->type === 'RadioField') {
$field->allowcustom = false;
}
return $field;
})->all();