mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
FIX Duplicate config values for cascade_duplicates no longer duplicate their duplicates
Previously you could define identical values for this config prop via a DataExtension and on the base class, resulting in double duplication
This commit is contained in:
parent
ec9281ee02
commit
d122995652
@ -428,6 +428,10 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
|
||||
// Get duplicates
|
||||
if ($relations === null) {
|
||||
$relations = $this->config()->get('cascade_duplicates');
|
||||
// Remove any duplicate entries before duplicating them
|
||||
if (is_array($relations)) {
|
||||
$relations = array_unique($relations);
|
||||
}
|
||||
}
|
||||
|
||||
// Create unsaved raw duplicate
|
||||
|
Loading…
x
Reference in New Issue
Block a user