fix: remove org_id from sd_iterations query (column doesnt exist)

This commit is contained in:
yumoqing 2026-08-02 16:15:44 +08:00
parent ccc0755a82
commit 8e0a45abca

View File

@ -5,7 +5,7 @@ org_id = await get_userorgid() or '0'
async with DBPools().sqlorContext(get_module_dbname('pipeline-sdlc')) as sor:
# Counts
projs = await sor.sqlExe("SELECT COUNT(*) as cnt FROM sd_projects WHERE status='active' AND org_id=${oid}$", {"oid": org_id})
iters = await sor.sqlExe("SELECT COUNT(*) as cnt FROM sd_iterations WHERE status='active' AND org_id=${oid}$", {"oid": org_id})
iters = await sor.sqlExe("SELECT COUNT(*) as cnt FROM sd_iterations WHERE status='active'", {})
bugs = await sor.sqlExe("SELECT COUNT(*) as cnt FROM sd_bugs WHERE status IN ('open','confirmed')", {})
approvs = await sor.sqlExe("SELECT COUNT(*) as cnt FROM pipeline_task_steps WHERE state='waiting' AND step_type IN ('human_task','approval_gate')", {})