diff --git a/lib/workload/stateless/stacks/workflow-manager/workflow_manager/models/utils.py b/lib/workload/stateless/stacks/workflow-manager/workflow_manager/models/utils.py index 3d41ab2d3..06e56a0b7 100644 --- a/lib/workload/stateless/stacks/workflow-manager/workflow_manager/models/utils.py +++ b/lib/workload/stateless/stacks/workflow-manager/workflow_manager/models/utils.py @@ -130,7 +130,8 @@ def transition_to(self, new_state: State) -> bool: def persist_state(self, new_state): new_state.workflow_run = self.workflow_run - new_state.payload.save() # Need to save Payload before we can save State + if new_state.payload: + new_state.payload.save() # Need to save Payload before we can save State new_state.save() @staticmethod