From 0a653a08bd3504ee50c12a120cfef5ff7d189c95 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Wed, 15 Aug 2018 04:53:58 -0400 Subject: [PATCH] Fix document workflow action context content. Signed-off-by: Roberto Rosario --- mayan/apps/document_states/models.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/mayan/apps/document_states/models.py b/mayan/apps/document_states/models.py index a2c0382241..3d7bd94b8e 100644 --- a/mayan/apps/document_states/models.py +++ b/mayan/apps/document_states/models.py @@ -469,15 +469,24 @@ class WorkflowInstanceLogEntry(models.Model): context = self.workflow_instance.get_context() context.update( { - 'action': action, 'entry_log': self } ) for action in self.transition.origin_state.exit_actions.filter(enabled=True): + context.update( + { + 'action': action, + } + ) action.execute(context=context) for action in self.transition.destination_state.entry_actions.filter(enabled=True): + context.update( + { + 'action': action, + } + ) action.execute(context=context) return result