Skip to content

Commit 5dd1c82

Browse files
fix: node creation
1 parent d01e3c3 commit 5dd1c82

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/pytest-simcore/src/pytest_simcore/db_entries_mocks.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ async def _(
136136
for node_id, node_data in project_workbench.items():
137137
# NOTE: workbench node have a lot of camecase fields. We validate with Node and
138138
# export to ProjectNodeCreate with alias=False
139-
node_model = Node.model_validate(node_data)
139+
node_model = ProjectNodeCreate.model_validate({"node_id": node_id, **node_data}, from_attributes=True)
140140

141141
# NOTE: currently no resources is passed until it becomes necessary
142142
project_workbench_node = {
@@ -150,9 +150,7 @@ async def _(
150150
await project_nodes_repo.add(
151151
con,
152152
nodes=[
153-
ProjectNodeCreate(
154-
node_id=NodeID(node_id), **project_workbench_node
155-
)
153+
node_model
156154
],
157155
)
158156

0 commit comments

Comments
 (0)