Skip to content

Commit

Permalink
Merge pull request #646 from umccr/fix/wfm-persist-empty-payload
Browse files Browse the repository at this point in the history
Only save payload if present
  • Loading branch information
reisingerf authored Nov 3, 2024
2 parents ed92fcf + 5bce9ed commit b32592b
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 b32592b

Please sign in to comment.