From 5b0cc93e4861bad831c8e160564733f24999e79c Mon Sep 17 00:00:00 2001 From: Sami Mokaddem Date: Wed, 13 Jul 2022 16:07:35 +0200 Subject: [PATCH] fix: [Module:execute_workflow] Saving log in DB no longer fails anymore --- app/Model/Module.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Model/Module.php b/app/Model/Module.php index 04009707a..9ae13e5bd 100644 --- a/app/Model/Module.php +++ b/app/Model/Module.php @@ -209,9 +209,9 @@ class Module extends AppModel $trigger_id = 'enrichment-before-query'; $workflowErrors = []; $logging = [ - 'model' => 'Module', - 'action' => 'queryModuleServer', - 'id' => $postData['event_id'], + 'model' => 'Workflow', + 'action' => 'execute_workflow', + 'id' => 0, 'message' => __('The workflow `%s` prevented event `%s` to query the module `%s`', $trigger_id, $postData['event_id'], $postData['module']), ]; if (empty($triggerData) && $this->Workflow->isTriggerCallable($trigger_id) && !empty($postData['attribute_uuid'])) { @@ -230,7 +230,7 @@ class Module extends AppModel ]; $attributes = $this->Attribute->fetchAttributes($user, $options); $triggerData = !empty($attributes) ? $attributes[0] : []; - $logging['message'] = __('The workflow `%s` prevented attribute `%s` to query the module `%s`', $trigger_id, $postData['attribute_uuid'], $postData['module']); + $logging['message'] = __('The workflow `%s` prevented attribute `%s` (from event `%s`) to query the module `%s`', $trigger_id, $postData['attribute_uuid'], $postData['event_id'], $postData['module']); } if (empty($triggerData)) { return false;