We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd4c5a6 commit ae2192aCopy full SHA for ae2192a
src/labthings/default_views/tasks.py
@@ -1,6 +1,7 @@
1
from flask import abort
2
3
from ..view import View
4
+from ..view.marshalling import marshal_with
5
from ..schema import TaskSchema
6
7
from .. import tasks
@@ -12,7 +13,7 @@ class TaskList(View):
12
13
14
def get(self):
15
"""List of all session tasks"""
- return tasks.tasks()
16
+ return self.schema.dump(tasks.tasks())
17
18
19
class TaskView(View):
@@ -41,7 +42,7 @@ def get(self, task_id):
41
42
43
task = task_dict.get(task_id)
44
- return task
45
+ return self.schema.dump(task)
46
47
def delete(self, task_id):
48
"""
@@ -58,4 +59,4 @@ def delete(self, task_id):
58
59
60
task.kill(block=True, timeout=3)
61
62
0 commit comments