mirror of
https://github.com/colymba/GridFieldBulkEditingTools.git
synced 2024-10-22 11:05:57 +02:00
FIX #152 force write image ID
ManyManyList::add did not call write on dataObject, so the image was never attached
This commit is contained in:
parent
e26ad4548b
commit
482139fd35
@ -93,6 +93,7 @@ class BulkUploadHandler extends RequestHandler
|
|||||||
|
|
||||||
$fileRelationName = $this->component->getFileRelationName($this->gridField);
|
$fileRelationName = $this->component->getFileRelationName($this->gridField);
|
||||||
$record->{"{$fileRelationName}ID"} = $fileID;
|
$record->{"{$fileRelationName}ID"} = $fileID;
|
||||||
|
$record->write(); //HasManyList call write on record but not ManyManyList, so we call it here again
|
||||||
|
|
||||||
$this->gridField->list->add($record);
|
$this->gridField->list->add($record);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user