Skip to content

Commit

Permalink
Only save payload if present
Browse files Browse the repository at this point in the history
  • Loading branch information
reisingerf committed Nov 3, 2024
1 parent ed92fcf commit 5bce9ed
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5bce9ed

Please sign in to comment.