fix: [internal] Attach correlation exclusion just when correlations are requested

pull/8582/head
Jakub Onderka 2022-09-13 10:59:15 +02:00
parent ed6dc118c4
commit f59e7a5090
1 changed files with 3 additions and 1 deletions

View File

@ -2068,7 +2068,9 @@ class Event extends AppModel
$event['Attribute'] = $this->__attachSharingGroups($event['Attribute'], $sharingGroupData);
}
$event['Attribute'] = $this->Attribute->Correlation->attachCorrelationExclusion($event['Attribute']);
if (!empty($options['includeGranularCorrelations'])) {
$event['Attribute'] = $this->Attribute->Correlation->attachCorrelationExclusion($event['Attribute']);
}
// move all object attributes to a temporary container
$tempObjectAttributeContainer = array();