紧急修复: get_all_tasks移除parent_task_id过滤 — 子任务也能出现在我的任务列表

This commit is contained in:
2026-08-05 16:30:45 +08:00
parent 9978714d40
commit 4ee3cb7552

View File

@ -217,8 +217,8 @@ async def get_all_tasks(
result = await db.execute(stmt)
tasks = result.scalars().all()
# 构造嵌套响应时只返回顶层任务
all_tasks = [_to_response(t) for t in tasks if t.parent_task_id is None]
# 返回所有匹配的任务(含子任务),不再过滤 parent_task_id
all_tasks = [_to_response(t) for t in tasks]
return TaskListResponse(tasks=all_tasks, total=len(all_tasks))