@@ -14,6 +14,7 @@ async def read_task(id: int, path: str):
14
14
from .utils import node_to_short_json
15
15
from aiida .orm import load_node
16
16
from aiida_workgraph .orm .workgraph import WorkGraphNode
17
+ from aiida_workgraph .utils import deserialize_input_values_recursively
17
18
18
19
# import inspect
19
20
@@ -22,7 +23,7 @@ async def read_task(id: int, path: str):
22
23
segments = path .split ("/" )
23
24
if isinstance (node , WorkGraphNode ):
24
25
ndata = node .workgraph_data ["tasks" ][segments [0 ]]
25
- ndata = deserialize_unsafe ( ndata )
26
+ deserialize_input_values_recursively ( ndata [ "inputs" ], deserialize_unsafe )
26
27
executor = node .task_executors .get (segments [0 ], None )
27
28
if len (segments ) == 1 :
28
29
ndata ["executor" ] = executor if executor else {}
@@ -40,8 +41,9 @@ async def read_task(id: int, path: str):
40
41
for child in map_info ["children" ]:
41
42
for prefix in map_info ["prefix" ]:
42
43
if f"{ prefix } _{ child } " == segments [1 ]:
43
- ndata = deserialize_unsafe (
44
- node .workgraph_data ["tasks" ][child ]
44
+ deserialize_input_values_recursively (
45
+ node .workgraph_data ["tasks" ][child ]["inputs" ],
46
+ deserialize_unsafe ,
45
47
)
46
48
executor = node .task_executors .get (child )
47
49
ndata ["name" ] = f"{ prefix } _{ child } "
0 commit comments