mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUG Files dataobjects with missing asset shouldn't un-attach themselves from parent object on save
This commit is contained in:
parent
6ae07d100c
commit
5fee4a81aa
@ -182,8 +182,9 @@ trait FileUploadReceiver
|
||||
// Filter items by what's allowed to be viewed
|
||||
$filteredItems = new ArrayList();
|
||||
$fileIDs = array();
|
||||
/** @var File $file */
|
||||
foreach ($items as $file) {
|
||||
if ($file->exists() && $file->canView()) {
|
||||
if ($file->isInDB() && $file->canView()) {
|
||||
$filteredItems->push($file);
|
||||
$fileIDs[] = $file->ID;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user