FIX Remove write from SearchableDropdownTrait

In the SearchableDropdownTrait::saveInto method, if the field is a has_one relationship, $record->write() was called. FormField and any other instances of saveInto should not call write - that should be called by the form itself.
This commit is contained in:
johannes.hammersen 2024-06-19 11:13:54 +02:00
parent 27873939f4
commit ce5cfcac61

View File

@ -397,7 +397,6 @@ trait SearchableDropdownTrait
$record->$classNameField = $ids ? $record->ClassName : '';
}
}
$record->write();
} else {
// has_many / many_many field
if (!method_exists($record, 'hasMethod')) {