Skip to content

Commit

Permalink
Merge pull request #343 from umccr/fix-wfm-payload-nullable
Browse files Browse the repository at this point in the history
Fixed WorkflowManager allow WRSC Payload nullable
  • Loading branch information
victorskl authored Jun 5, 2024
2 parents 1832e00 + 54504c3 commit 6ec9a1f
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,16 @@ def handler(event, context):
print("Persisting Workflow record.")
workflow.save()

# first create a new payload entry and assign a unique reference ID for it
# if payload is not null, create a new payload entry and assign a unique reference ID for it
input_payload: Payload = wrsc.payload
pld = Payload(
payload_ref_id = str(uuid.uuid4()),
version = input_payload.version,
data = input_payload.data
)
print("Persisting Payload record.")
pld.save()
if input_payload:
pld = Payload(
payload_ref_id = str(uuid.uuid4()),
version = input_payload.version,
data = input_payload.data
)
print("Persisting Payload record.")
pld.save()

# then create the actual workflow run state change entry
wfr = WorkflowRun(
Expand Down

0 comments on commit 6ec9a1f

Please sign in to comment.