when updating a step to canceled status, we can skip terminal status check when is_last = true (#524)
This commit is contained in:
@@ -66,6 +66,9 @@ class Step(BaseModel):
|
|||||||
if status and not old_status.can_update_to(status):
|
if status and not old_status.can_update_to(status):
|
||||||
raise ValueError(f"invalid_status_transition({old_status},{status},{self.step_id})")
|
raise ValueError(f"invalid_status_transition({old_status},{status},{self.step_id})")
|
||||||
|
|
||||||
|
if status == StepStatus.canceled:
|
||||||
|
return
|
||||||
|
|
||||||
if status and status.requires_output() and output is None:
|
if status and status.requires_output() and output is None:
|
||||||
raise ValueError(f"status_requires_output({status},{self.step_id})")
|
raise ValueError(f"status_requires_output({status},{self.step_id})")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user