Commit 4f2cf79a authored by Joel Collins's avatar Joel Collins
Browse files

Task route now returns a dictionary with task ID as key

parent 2e17b449
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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):
        """