Task route now returns a dictionary with task ID as key

This commit is contained in:
Joel Collins 2019-02-19 16:12:14 +00:00
parent 2e17b449dd
commit 4f2cf79a26

View file

@ -21,7 +21,12 @@ class TaskOrchestrator:
"""
Returns a list of dictionary representations of all tasks in the session.
"""
return [task.state for task in self.tasks]
state = {}
for task in self.tasks:
state[task.id] = task.state
return state
def task_from_id(self, task_id: str):
"""