feat: change workflow ordering to sort by version instead of creation date

Signed-off-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
-LAN- 2025-03-04 14:51:45 +08:00
parent c9e455ad14
commit 0e2cabf048
No known key found for this signature in database
GPG Key ID: 6BA0D108DED011FF

View File

@ -100,7 +100,7 @@ class WorkflowService:
stmt = (
select(Workflow)
.where(Workflow.app_id == app_model.id)
.order_by(Workflow.created_at.desc())
.order_by(Workflow.version.desc())
.limit(limit + 1)
.offset((page - 1) * limit)
)