AI创作批量生成任务 V4 修复客户端AI创作排序BUG
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user