File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
src/simcore_service_webserver/projects Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -81,21 +81,21 @@ async def batch_get_trashed_by_primary_gid(
8181 Returns:
8282 values of trashed_by_primary_gid in the SAME ORDER as projects_uuids
8383 """
84+ if not projects_uuids :
85+ return []
86+
8487 projects_uuids_str = [f"{ uuid } " for uuid in projects_uuids ]
88+
8589 query = (
8690 sa .select (
8791 users .c .primary_gid .label ("trashed_by_primary_gid" ),
8892 )
8993 .select_from (projects .outerjoin (users , projects .c .trashed_by == users .c .id ))
9094 .where (projects .c .uuid .in_ (projects_uuids_str ))
9195 ).order_by (
92- # Preserves the order of projects_uuids
93- sa .case (
94- * [
95- (projects .c .uuid == uuid , index )
96- for index , uuid in enumerate (projects_uuids_str )
97- ]
98- )
96+ * [
97+ projects .c .uuid == uuid for uuid in projects_uuids_str
98+ ] # Preserves the order of project_uuids
9999 )
100100 async with pass_or_acquire_connection (get_asyncpg_engine (app ), connection ) as conn :
101101 result = await conn .stream (query )
Original file line number Diff line number Diff line change @@ -439,7 +439,7 @@ async def _creator(
439439 "folderId" ,
440440 ]
441441
442- for key in new_project :
442+ for key in expected_data :
443443 if key not in modified_fields :
444444 assert expected_data [key ] == new_project [key ]
445445
You can’t perform that action at this time.
0 commit comments