auto-sync: 2026-05-22 14:57:42

This commit is contained in:
cfdaily
2026-05-22 14:57:42 +08:00
parent ac127c9d9e
commit fa4383383b
+6 -1
View File
@@ -616,7 +616,12 @@ curl -X POST http://{api_host}:{api_port}/api/projects/{project_id}/tasks/{task_
row = conn.execute(
"SELECT id, title, status FROM tasks WHERE id=?", (task_id,)
).fetchone()
return dict(row) if row else None
if not row:
return None
info = dict(row)
# 从 db_path 推断 project_id: data/<project_id>/blackboard.db
info["project_id"] = db_path.parent.name
return info
finally:
conn.close()
except Exception: