fix: [enrichment] Added missing data field in attribute in case of attachement type attribute

pull/4313/head
chrisr3d 2019-03-15 11:28:42 +01:00
parent 7123c949c2
commit b71ec87021
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
1 changed files with 3 additions and 0 deletions

View File

@ -5038,6 +5038,9 @@ class EventsController extends AppController
private function __queryEnrichment($attribute, $module, $options, $type)
{
if ($this->Event->Attribute->typeIsAttachment($attribute[0]['Attribute']['type'])) {
$attribute[0]['Attribute']['data'] = $this->Event->Attribute->base64EncodeAttachment($attribute[0]['Attribute']);
}
$data = array('module' => $module, 'attribute' => $attribute[0]['Attribute'], 'event_id' => $attribute[0]['Event']['id']);
if (!empty($options)) {
$data['config'] = $options;