chg: [internal] Optimise Event::getRelatedEvents for non correlated events

pull/6288/head
Jakub Onderka 2020-09-04 22:09:21 +02:00
parent 3153b45539
commit e475b2bf7f
1 changed files with 4 additions and 0 deletions

View File

@ -832,6 +832,10 @@ class Event extends AppModel
'group' => 'Correlation.event_id',
'order' => array('Correlation.event_id DESC')));
if (empty($correlations)) {
return [];
}
$relatedEventIds = array_values($correlations);
// now look up the event data for these attributes
$conditions = $this->createEventConditions($user);