Skip to content

Commit 0ebac7d

Browse files
committed
Use Subflow type for subflows
1 parent ac80151 commit 0ebac7d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/routers/openml/flows.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import database.flows
88
from core.conversions import _str_to_num
99
from routers.dependencies import expdb_connection
10-
from schemas.flows import Flow, Parameter
10+
from schemas.flows import Flow, Parameter, Subflow
1111

1212
router = APIRouter(prefix="/flows", tags=["flows"])
1313

@@ -51,10 +51,10 @@ def get_flow(flow_id: int, expdb: Annotated[Connection, Depends(expdb_connection
5151
tags = database.flows.get_tags(flow_id, expdb)
5252
subflow_rows = database.flows.get_subflows(flow_id, expdb)
5353
subflows = [
54-
{
55-
"identifier": subflow.identifier,
56-
"flow": get_flow(flow_id=subflow.child_id, expdb=expdb),
57-
}
54+
Subflow(
55+
identifier=subflow.identifier,
56+
flow=get_flow(flow_id=subflow.child_id, expdb=expdb),
57+
)
5858
for subflow in subflow_rows
5959
]
6060

0 commit comments

Comments
 (0)