fix: task查询按project_id过滤
This commit is contained in:
parent
64ba5daf92
commit
fe5b7a98ec
@ -26,11 +26,11 @@ async with DBPools().sqlorContext(dbname) as sor:
|
|||||||
if precs and len(precs) > 0:
|
if precs and len(precs) > 0:
|
||||||
pname = getattr(precs[0], 'name', '') or ''
|
pname = getattr(precs[0], 'name', '') or ''
|
||||||
|
|
||||||
# Get tasks
|
# Get tasks for this project (tenant_id = project_id for SDLC tasks)
|
||||||
tasks = await sor.sqlExe(
|
tasks = await sor.sqlExe(
|
||||||
"SELECT id, title, state, current_version, created_at, params, role "
|
"SELECT id, title, state, current_version, created_at, params, role "
|
||||||
"FROM pipeline_tasks WHERE tenant_id='0' ORDER BY created_at DESC LIMIT 50",
|
"FROM pipeline_tasks WHERE tenant_id=${pid}$ ORDER BY created_at DESC LIMIT 50",
|
||||||
{})
|
{"pid": pid})
|
||||||
|
|
||||||
task_list = []
|
task_list = []
|
||||||
for t in tasks:
|
for t in tasks:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user