mirror of
https://github.com/sartography/cr-connect-workflow.git
synced 2025-02-20 11:48:16 +00:00
Don't reset the token to something that already has a token. Terrible things happen and we hit a recursion.
This commit is contained in:
parent
d62c173494
commit
fc080ce7a8
@ -149,7 +149,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.")
|
||||
|
||||
task.reset_token(reset_data=False) # we could optionally clear the previous data.
|
||||
# Only reset the token if the task doesn't already have it.
|
||||
if task.state == task.COMPLETED:
|
||||
task.reset_token(reset_data=False) # we could optionally clear the previous data.
|
||||
processor.save()
|
||||
WorkflowService.log_task_action(processor, task, WorkflowService.TASK_ACTION_TOKEN_RESET)
|
||||
workflow_api_model = __get_workflow_api_model(processor, task)
|
||||
|
Loading…
x
Reference in New Issue
Block a user