Fix key error on shadow attribute's id

pull/9589/head
Vincenzo Caputo 2024-03-16 16:27:57 +00:00
parent 044923ee3a
commit 752638528b
1 changed files with 2 additions and 1 deletions

View File

@ -201,11 +201,12 @@ class ShadowAttribute extends AppModel
$isTriggerCallable = $this->isTriggerCallable($trigger_id);
if ($isTriggerCallable) {
$triggerData = $this->data;
$shadowAttribute_id = $triggerData['ShadowAttribute']['id'] ?? 0;
$workflowErrors = [];
$logging = [
'model' => 'ShadowAttribute',
'action' => 'add',
'id' => $this->data['ShadowAttribute']['id'],
'id' => $shadowAttribute_id,
'message' => __('The workflow `%s` prevented the saving of this proposal.', $trigger_id)
];
$workflowSuccess = $this->executeTrigger($trigger_id, $triggerData, $workflowErrors, $logging);