Skip to content

Commit

Permalink
Merge pull request #27 from qua-platform/targets_serialization
Browse files Browse the repository at this point in the history
feat: serialize targets only for graph
  • Loading branch information
nulinspiratie authored Oct 17, 2024
2 parents 6b7967e + 69810f3 commit 9b53c13
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 9b53c13

Please sign in to comment.