From 53912f8922a0f5cba9d246b9fe297feb640c9b42 Mon Sep 17 00:00:00 2001 From: Maxim V4S Date: Mon, 14 Oct 2024 18:14:46 +0300 Subject: [PATCH] feat: serialize targets only for graph --- qualibrate_runner/api/routes/get_runnables.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qualibrate_runner/api/routes/get_runnables.py b/qualibrate_runner/api/routes/get_runnables.py index 075423e..939f0d4 100644 --- a/qualibrate_runner/api/routes/get_runnables.py +++ b/qualibrate_runner/api/routes/get_runnables.py @@ -24,7 +24,10 @@ def get_nodes( nodes: Annotated[Mapping[str, QualibrationNode], Depends(get_qnodes)], ) -> Mapping[str, Any]: - return {node_name: node.serialize() for node_name, node in nodes.items()} + return { + node_name: node.serialize(exclude_targets=True) + for node_name, node in nodes.items() + } @get_runnables_router.get("/get_graphs") @@ -42,7 +45,7 @@ def get_graphs( def get_node( node: Annotated[QualibrationNode, Depends(get_qnode)], ) -> Mapping[str, Any]: - return cast(Mapping[str, Any], node.serialize()) + return cast(Mapping[str, Any], node.serialize(exclude_targets=True)) @get_runnables_router.get("/get_graph")