紧急修复: get_all_tasks移除parent_task_id过滤 — 子任务也能出现在我的任务列表
This commit is contained in:
@ -217,8 +217,8 @@ async def get_all_tasks(
|
|||||||
result = await db.execute(stmt)
|
result = await db.execute(stmt)
|
||||||
tasks = result.scalars().all()
|
tasks = result.scalars().all()
|
||||||
|
|
||||||
# 构造嵌套响应时只返回顶层任务
|
# 返回所有匹配的任务(含子任务),不再过滤 parent_task_id
|
||||||
all_tasks = [_to_response(t) for t in tasks if t.parent_task_id is None]
|
all_tasks = [_to_response(t) for t in tasks]
|
||||||
return TaskListResponse(tasks=all_tasks, total=len(all_tasks))
|
return TaskListResponse(tasks=all_tasks, total=len(all_tasks))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user