From 7d9c50a74d6c1e3385090e842318f4ecd19493f5 Mon Sep 17 00:00:00 2001 From: GinHa <15201596918@163.com> Date: Wed, 15 Jul 2026 13:23:02 +0800 Subject: [PATCH] =?UTF-8?q?AI=E5=88=9B=E4=BD=9C=E6=89=B9=E9=87=8F=E7=94=9F?= =?UTF-8?q?=E6=88=90=E4=BB=BB=E5=8A=A1=20V3=20=E4=BF=AE=E5=A4=8DAI?= =?UTF-8?q?=E5=88=9B=E4=BD=9C=E5=AE=A2=E6=88=B7=E7=AB=AF=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- video-gen-api/app/api/v1/generation_ai.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video-gen-api/app/api/v1/generation_ai.py b/video-gen-api/app/api/v1/generation_ai.py index 03345970..200f8e92 100644 --- a/video-gen-api/app/api/v1/generation_ai.py +++ b/video-gen-api/app/api/v1/generation_ai.py @@ -347,7 +347,7 @@ async def list_tasks( # 同一个 API 同时服务管理后台和客户端: # - 管理员保持数据库倒序,最新记录在列表上方; # - 普通用户先查询最新一页,再仅反转当前页,聊天消息从旧到新排列。 - items_for_output = items if is_admin else list(reversed(items)) + items_for_output = items if is_admin else sorted(items, key=lambda x: x.created_at if x.created_at is not None else x.id,reverse=False) out_items = await build_task_out_list( db, items_for_output,