Skip to content

Commit 0ac9337

Browse files
committed
uniformize
1 parent 7854d38 commit 0ac9337

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

services/web/server/src/simcore_service_webserver/projects/_projects_repository_legacy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,7 @@ async def update_project_node_data(
889889
extra=get_log_record_extra(user_id=user_id),
890890
):
891891
partial_workbench_data: dict[NodeIDStr, Any] = {
892-
NodeIDStr(f"{node_id}"): new_node_data,
892+
f"{node_id}": new_node_data,
893893
}
894894
return await self._update_project_workbench_with_lock_and_notify(
895895
partial_workbench_data,

services/web/server/src/simcore_service_webserver/projects/_projects_service.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,8 +1149,8 @@ async def update_project_node_state(
11491149
user_id,
11501150
)
11511151

1152-
db: ProjectDBAPI = app[APP_PROJECT_DBAPI]
1153-
product_name = await db.get_project_product(project_id)
1152+
_projects_repository = ProjectDBAPI.get_from_app_context(app)
1153+
product_name = await _projects_repository.get_project_product(project_id)
11541154
await check_user_project_permission(
11551155
app,
11561156
project_id=project_id,
@@ -1161,7 +1161,7 @@ async def update_project_node_state(
11611161

11621162
# Delete this once workbench is removed from the projects table
11631163
# See: https://github.com/ITISFoundation/osparc-simcore/issues/7046
1164-
await db.update_project_node_data(
1164+
await _projects_repository.update_project_node_data(
11651165
user_id=user_id,
11661166
project_uuid=project_id,
11671167
node_id=node_id,
@@ -1297,8 +1297,8 @@ async def update_project_node_outputs(
12971297
)
12981298
new_outputs = new_outputs or {}
12991299

1300-
db: ProjectDBAPI = app[APP_PROJECT_DBAPI]
1301-
product_name = await db.get_project_product(project_id)
1300+
_projects_repository = ProjectDBAPI.get_from_app_context(app)
1301+
product_name = await _projects_repository.get_project_product(project_id)
13021302
await check_user_project_permission(
13031303
app,
13041304
project_id=project_id,
@@ -1307,7 +1307,10 @@ async def update_project_node_outputs(
13071307
permission="write", # NOTE: MD: before only read was sufficient, double check this
13081308
)
13091309

1310-
updated_project, changed_entries = await db.update_project_node_data(
1310+
(
1311+
updated_project,
1312+
changed_entries,
1313+
) = await _projects_repository.update_project_node_data(
13111314
user_id=user_id,
13121315
project_uuid=project_id,
13131316
node_id=node_id,

0 commit comments

Comments
 (0)