AI创作批量生成任务 V4 修复客户端AI创作排序BUG

This commit is contained in:
2026-07-15 13:30:59 +08:00
parent 7d9c50a74d
commit 51673453d8
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -347,7 +347,7 @@ async def list_tasks(
# 同一个 API 同时服务管理后台和客户端:
# - 管理员保持数据库倒序,最新记录在列表上方;
# - 普通用户先查询最新一页,再仅反转当前页,聊天消息从旧到新排列。
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)
items_for_output = items if is_admin else list(reversed(items))
out_items = await build_task_out_list(
db,
items_for_output,