Skip to content

Commit 964c9f1

Browse files
improvement
1 parent ebdf8c3 commit 964c9f1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ async def _list_root_child_projects(
108108
trashed=None,
109109
offset=page_params.offset,
110110
limit=page_params.limit,
111-
order_by=OrderBy(field=IDStr("id"), direction=OrderDirection.ASC),
111+
order_by=OrderBy(
112+
field=IDStr("last_change_date"), direction=OrderDirection.DESC
113+
),
112114
)
113115

114116
child_projects.extend([Project(**project).uuid for project in projects])
@@ -332,7 +334,9 @@ async def batch_delete_trashed_workspaces_as_admin(
332334
trashed_before=trashed_before,
333335
offset=page_params.offset,
334336
limit=page_params.limit,
335-
order_by=OrderBy(field=IDStr("trashed"), direction=OrderDirection.ASC),
337+
order_by=OrderBy(
338+
field=IDStr("workspace_id"), direction=OrderDirection.DESC
339+
),
336340
)
337341
# BATCH delete
338342
for trashed_workspace in expired_trashed_workspaces:

0 commit comments

Comments
 (0)