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,7 +93,8 @@ class BulkUploadHandler extends RequestHandler
|
||||
|
||||
$fileRelationName = $this->component->getFileRelationName($this->gridField);
|
||||
$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);
|
||||
|
||||
if ($this->component->getAutoPublishDataObject() && $record->hasExtension('Versioned'))
|
||||
|
Loading…
Reference in New Issue
Block a user