Skip to content

Commit d8b9af4

Browse files
committed
fixes projects
1 parent 0b72c8d commit d8b9af4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ async def patch_project(
5353

5454
def _select_trashed_by_primary_gid_query() -> sql.Select:
5555
return sa.select(
56+
projects.c.uuid,
5657
users.c.primary_gid.label("trashed_by_primary_gid"),
5758
).select_from(projects.outerjoin(users, projects.c.trashed_by == users.c.id))
5859

@@ -106,4 +107,6 @@ async def batch_get_trashed_by_primary_gid(
106107
)
107108
async with pass_or_acquire_connection(get_asyncpg_engine(app), connection) as conn:
108109
result = await conn.stream(query)
109-
return [row.trashed_by_primary_gid async for row in result]
110+
rows = {row.uuid: row.trashed_by_primary_gid async for row in result}
111+
112+
return [rows.get(uuid) for uuid in projects_uuids_str]

0 commit comments

Comments
 (0)