mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 09:05:53 +00:00
BUGFIX AssetAdmin root navigation (fixes #7448)
Return a new object instance rather than relying on singleton(), which might've been modified elsewhere, and have a non-zero ID/ParentID.
This commit is contained in:
parent
f94f03defe
commit
eaf05a6a7c
@ -462,7 +462,7 @@ JS
|
|||||||
if($id && is_numeric($id) && $id > 0) {
|
if($id && is_numeric($id) && $id > 0) {
|
||||||
return DataObject::get_by_id('Folder', $id);
|
return DataObject::get_by_id('Folder', $id);
|
||||||
} else {
|
} else {
|
||||||
return singleton('Folder');
|
return new Folder();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user