diff --git a/tests/test_workflows.py b/tests/test_workflows.py index 8d2f96804..eb87765f8 100644 --- a/tests/test_workflows.py +++ b/tests/test_workflows.py @@ -4891,6 +4891,7 @@ def test_call_external_workflow_with_evolution_linked_object(pub): logged_error = LoggedError.select()[0] assert logged_error.summary == 'Could not find linked "External Form" object by id %s' % external_formdata.id assert logged_error.exception_class == 'KeyError' + assert logged_error.status_item_id == action.id # try remove an unexisting carddef: do nothing unused_carddef = CardDef() diff --git a/wcs/wf/external_workflow.py b/wcs/wf/external_workflow.py index f84b5f046..0bcd87199 100644 --- a/wcs/wf/external_workflow.py +++ b/wcs/wf/external_workflow.py @@ -144,7 +144,7 @@ class ExternalWorkflowGlobalAction(WorkflowStatusItem): # use custom error message depending on target type LoggedError.record(_('Could not find linked "%(object_name)s" object by id %(object_id)s') % { 'object_name': objectdef.name, 'object_id': target_id}, - formdata=formdata, exception=e) + formdata=formdata, status_item=self, exception=e) def get_parameters(self): return ('slug', 'trigger_id', 'condition') @@ -156,7 +156,8 @@ class ExternalWorkflowGlobalAction(WorkflowStatusItem): trigger = self.get_trigger(objectdef.workflow) if not trigger: - LoggedError.record(_('No trigger with id "%s" found in workflow') % self.trigger_id) + LoggedError.record(_('No trigger with id "%s" found in workflow') % self.trigger_id, + formdata=formdata, status_item=self) return class CallerSource: