fix: [eventReport:downloadMarkdownFromURL] Added support of trigger for that function

pull/8568/head
Sami Mokaddem 2022-08-24 10:36:00 +02:00
parent 75d75cc6e6
commit c79324528b
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
2 changed files with 6 additions and 1 deletions

View File

@ -916,7 +916,7 @@ class EventReport extends AppModel
'url' => $url
];
if (!empty($module)) {
$result = $this->Module->queryModuleServer($modulePayload, false);
$result = $this->Module->queryModuleServer($modulePayload, false, 'Enrichment', false, []);
if (empty($result['results'][0]['values'][0])) {
return '';
}

View File

@ -234,6 +234,11 @@ class Module extends AppModel
$attributes = $this->Attribute->fetchAttributes($user, $options);
$triggerData = !empty($attributes) ? $attributes[0] : [];
$logging['message'] = __('The workflow `%s` prevented attribute `%s` (from event `%s`) to query the module `%s`', $trigger_id, $postData['attribute_uuid'], $triggerData['Attribute']['event_id'], $postData['module']);
} else if (empty($triggerData) && !empty($postData['event_id'])) {
$this->Event = ClassRegistry::init('Event');
$event = $this->Event->quickFetchEvent($postData['event_id']);
$triggerData =$event;
$logging['message'] = __('The workflow `%s` prevented event `%s` to query the module `%s`', $trigger_id, $postData['event_id'], $postData['module']);
} else {
if (isset($triggerData['Attribute'])) {
$logging['message'] = __('The workflow `%s` prevented attribute `%s` (from event `%s`) to query the module `%s`',