fixing a big stupid bug I created when merging all the code and making changes to the files.
This commit is contained in:
parent
50ad42d3a8
commit
286803d10b
|
@ -216,7 +216,7 @@ def update_task(workflow_id, task_id, body, terminate_loop=None, update_all=Fals
|
|||
raise ApiError("invalid_state", "You may not update a task unless it is in the READY state. "
|
||||
"Consider calling a token reset to make this task Ready.")
|
||||
|
||||
if terminate_loop:
|
||||
if terminate_loop and spiff_task.is_looping():
|
||||
spiff_task.terminate_loop()
|
||||
|
||||
# Extract the details specific to the form submitted
|
||||
|
|
|
@ -269,3 +269,12 @@ class TestTasksApi(BaseTest):
|
|||
|
||||
self.assertEqual(0, len(self.get_assignment_task_events(submitter.uid)))
|
||||
self.assertEqual(0, len(self.get_assignment_task_events(supervisor.uid)))
|
||||
|
||||
def test_no_error_when_calling_end_loop_on_non_looping_task(self):
|
||||
|
||||
workflow = self.create_workflow('hello_world')
|
||||
workflow_api = self.get_workflow_api(workflow)
|
||||
|
||||
data = workflow_api.next_task.data
|
||||
data['name'] = "john"
|
||||
workflow_api = self.complete_form(workflow, workflow_api.next_task, data, terminate_loop=True)
|
||||
|
|
Loading…
Reference in New Issue