Skip to content

Commit

Permalink
feat: serialize targets only for graph
Browse files Browse the repository at this point in the history
  • Loading branch information
maxim-v4s committed Oct 14, 2024
1 parent 6c18343 commit 53912f8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions qualibrate_runner/api/routes/get_runnables.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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")
Expand Down

0 comments on commit 53912f8

Please sign in to comment.