mirror of
https://github.com/ThearchyHelios/AgentLab.git
synced 2026-11-19 20:22:01 +00:00
合入 W2-a 的复核修复(nr8/a:导入的 NOT NULL 补值与孤儿行、收尾 dispose、sslmode 换算、PostgreSQL 写入去 NUL、不分大小写搜索 contains_ci、json_eq 两库同语义、JSON 守卫、用户可见列表补决胜键、bubblewrap --clearenv、部署脚本与原子写的几处、README 连接数预算)
# Conflicts: # backend/app/api/schedules.py # backend/app/main.py
This commit is contained in:
@@ -221,7 +221,7 @@ async def list_documents(
|
||||
collection: str | None = None,
|
||||
session: AsyncSession = Depends(get_session),
|
||||
) -> list[Document]:
|
||||
stmt = select(Document).order_by(Document.created_at.desc()).limit(300)
|
||||
stmt = select(Document).order_by(Document.created_at.desc(), Document.id.desc()).limit(300)
|
||||
if collection:
|
||||
stmt = stmt.where(Document.collection == collection)
|
||||
return list((await session.execute(stmt)).scalars())
|
||||
@@ -710,7 +710,7 @@ class SkillOut(SkillIn):
|
||||
|
||||
@skills_router.get("", response_model=list[SkillOut])
|
||||
async def list_skills(session: AsyncSession = Depends(get_session)) -> list[Skill]:
|
||||
return list((await session.execute(select(Skill).order_by(Skill.created_at.desc()))).scalars())
|
||||
return list((await session.execute(select(Skill).order_by(Skill.created_at.desc(), Skill.id.desc()))).scalars())
|
||||
|
||||
|
||||
@skills_router.post("", response_model=SkillOut, status_code=201)
|
||||
|
||||
Reference in New Issue
Block a user