mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
FIX: Write relations when saving in grid-field item edit form
Fixes https://github.com/silverstripe/silverstripe-framework/issues/9162
This commit is contained in:
parent
3224c9971b
commit
d088354f46
@ -610,9 +610,10 @@ class GridFieldDetailForm_ItemRequest extends RequestHandler
|
||||
$this->record = $this->record->newClassInstance($newClassName);
|
||||
}
|
||||
|
||||
// Save form and any extra saved data into this dataobject
|
||||
// Save form and any extra saved data into this dataobject.
|
||||
// Set writeComponents = true to write has-one relations / join records
|
||||
$form->saveInto($this->record);
|
||||
$this->record->write();
|
||||
$this->record->write(false, false, false, true);
|
||||
$this->extend('onAfterSave', $this->record);
|
||||
|
||||
$extraData = $this->getExtraSavedData($this->record, $list);
|
||||
|
Loading…
x
Reference in New Issue
Block a user