Skip to content

Commit 34ff63e

Browse files
review @pcrespov
1 parent b5dd68a commit 34ff63e

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ async def _aggregate_data_to_projects_from_other_sources(
9696
return updated_projects
9797

9898

99-
async def _convert_db_projects_to_api_projects(
99+
async def _legacy_convert_db_projects_to_api_projects(
100100
app: web.Application,
101101
db,
102102
db_projects: list,
@@ -191,7 +191,9 @@ async def list_projects( # pylint: disable=too-many-arguments
191191
order_by=order_by,
192192
)
193193

194-
api_projects = await _convert_db_projects_to_api_projects(app, db, db_projects)
194+
api_projects = await _legacy_convert_db_projects_to_api_projects(
195+
app, db, db_projects
196+
)
195197

196198
final_projects = await _aggregate_data_to_projects_from_other_sources(
197199
app, db_projects=api_projects, user_id=user_id
@@ -231,7 +233,9 @@ async def list_projects_full_depth(
231233
order_by=order_by,
232234
)
233235

234-
api_projects = await _convert_db_projects_to_api_projects(app, db, db_projects)
236+
api_projects = await _legacy_convert_db_projects_to_api_projects(
237+
app, db, db_projects
238+
)
235239

236240
final_projects = await _aggregate_data_to_projects_from_other_sources(
237241
app, db_projects=api_projects, user_id=user_id

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -677,10 +677,6 @@ async def list_projects_dicts( # pylint: disable=too-many-arguments,too-many-st
677677
combined_query.offset(offset).limit(limit)
678678
)
679679
]
680-
# async for row in conn.execute(combined_query.offset(offset).limit(limit)):
681-
# ProjectListAtDB.model_validate(row)
682-
# prj: dict[str, Any] = dict(row.items())
683-
# prjs_output.append(prj)
684680

685681
return (
686682
prjs_output,
@@ -1258,7 +1254,7 @@ async def remove_tag(
12581254
project["tags"].remove(tag_id)
12591255
return convert_to_schema_names(project, user_email)
12601256

1261-
async def get_tags_by_project(self, project_id: str) -> list:
1257+
async def get_tags_by_project(self, project_id: str) -> list[int]:
12621258
async with self.engine.acquire() as conn:
12631259
query = sa.select(projects_tags.c.tag_id).where(
12641260
projects_tags.c.project_id == project_id

0 commit comments

Comments
 (0)