File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
python_workflow_definition/src/python_workflow_definition Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,10 @@ def plot(file_name: str):
3939 k + "=result[" + v [SOURCE_PORT_LABEL ] + "]"
4040 )
4141 for k , v in edge_label_dict .items ():
42- graph .add_edge (str (k ), str (target_node ), label = ", " .join (v ))
42+ if len (v ) == 1 and v [0 ] is not None :
43+ graph .add_edge (str (k ), str (target_node ), label = ", " .join (v ))
44+ else :
45+ graph .add_edge (str (k ), str (target_node ))
4346
4447 svg = nx .nx_agraph .to_agraph (graph ).draw (prog = "dot" , format = "svg" )
4548 display (SVG (svg ))
Original file line number Diff line number Diff line change @@ -42,7 +42,8 @@ def get_source_handles(edges_lst: list) -> dict:
4242
4343def convert_nodes_list_to_dict (nodes_list : list ) -> dict :
4444 return {
45- str (el ["id" ]): el ["value" ] for el in sorted (nodes_list , key = lambda d : d ["id" ])
45+ str (el ["id" ]): el ["value" ] if "value" in el else el ["name" ]
46+ for el in sorted (nodes_list , key = lambda d : d ["id" ])
4647 }
4748
4849
You can’t perform that action at this time.
0 commit comments