fix: [decaying] Include EventTags for score computation in `event/view`

pull/5032/head
mokaddem 2019-08-23 15:53:50 +02:00
parent 0fdf181d70
commit 61efb2f7c6
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 6 additions and 0 deletions

View File

@ -2171,7 +2171,13 @@ class Event extends AppModel
}
}
if (isset($options['includeDecayScore']) && $options['includeDecayScore']) {
if (isset($event['EventTag'])) { // include EventTags for score computation
$event['Attribute'][$key]['EventTag'] = $event['EventTag'];
}
$this->DecayingModel->attachScoresToAttribute($user, $event['Attribute'][$key]);
if (isset($event['EventTag'])) { // remove included EventTags
unset($event['Attribute'][$key]['EventTag']);
}
}
// unset empty attribute tags that got added because the tag wasn't exportable
if (!empty($attribute['AttributeTag'])) {