Skip to content

Commit 34a3695

Browse files
committed
also forgot
1 parent cacfba6 commit 34a3695

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

services/web/server/src/simcore_service_webserver/workspaces/_workspaces_db.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,12 @@ async def list_workspaces_for_user(
160160
count_result = await conn.execute(count_query)
161161
total_count = count_result.scalar()
162162

163-
result = await conn.execute(list_query)
164-
rows = result.fetchall() or []
165-
results: list[UserWorkspaceAccessRightsDB] = [
166-
UserWorkspaceAccessRightsDB.from_orm(row) for row in rows
163+
result = await conn.stream(list_query)
164+
workspaces: list[UserWorkspaceAccessRightsDB] = [
165+
UserWorkspaceAccessRightsDB.from_orm(row) async for row in result
167166
]
168167

169-
return cast(int, total_count), results
168+
return cast(int, total_count), workspaces
170169

171170

172171
async def get_workspace_for_user(

0 commit comments

Comments
 (0)