Do not send cancel events if you are navigating to the current task.

This commit is contained in:
Dan 2022-03-02 12:24:03 -05:00
parent 07e13584e7
commit a74ae647d6

View File

@ -266,11 +266,9 @@ def set_current_task(workflow_id, task_id):
raise ApiError("invalid_state", "You may not move the token to a task who's state is not "
"currently set to COMPLETE or READY.")
# If we have an interrupt task, run it.
processor.cancel_notify()
# Only reset the token if the task doesn't already have it.
if spiff_task.state == spiff_task.COMPLETED:
processor.cancel_notify()
spiff_task.reset_token({}, reset_data=True) # Don't try to copy the existing data back into this task.
processor.save()