Fix: Task-Roll-up mit RealDictCursor kompatibel.
All checks were successful
Deploy Development / deploy (push) Successful in 42s
Test Suite / pytest-backend (push) Successful in 1m58s
Test Suite / lint-backend (push) Successful in 2s
Test Suite / compose-smoke (push) Has been skipped
Test Suite / k6 /api/health Baseline (push) Successful in 18s
Test Suite / playwright-smoke (push) Successful in 14s
All checks were successful
Deploy Development / deploy (push) Successful in 42s
Test Suite / pytest-backend (push) Successful in 1m58s
Test Suite / lint-backend (push) Successful in 2s
Test Suite / compose-smoke (push) Has been skipped
Test Suite / k6 /api/health Baseline (push) Successful in 18s
Test Suite / playwright-smoke (push) Successful in 14s
rollup_parent_status nutzte Index-Zugriff row[0]; pytest test_nested_tasks_and_rollup schlug fehl. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
ba28a86fe5
commit
3e96b9c1e9
|
|
@ -180,7 +180,9 @@ def _rollup_parent_status(cur, *, tenant_id: str, parent_task_id: str) -> None:
|
|||
""",
|
||||
(tenant_id, parent_task_id),
|
||||
)
|
||||
child_statuses = [row[0] for row in cur.fetchall()]
|
||||
child_statuses = [
|
||||
row["status"] if isinstance(row, dict) else row[0] for row in cur.fetchall()
|
||||
]
|
||||
if not child_statuses:
|
||||
return
|
||||
if any(status not in TERMINAL_TASK_STATUSES for status in child_statuses):
|
||||
|
|
@ -196,8 +198,11 @@ def _rollup_parent_status(cur, *, tenant_id: str, parent_task_id: str) -> None:
|
|||
(parent_task_id, tenant_id),
|
||||
)
|
||||
row = cur.fetchone()
|
||||
if row and row[0]:
|
||||
_rollup_parent_status(cur, tenant_id=tenant_id, parent_task_id=str(row[0]))
|
||||
if not row:
|
||||
return
|
||||
next_parent = row["parent_task_id"] if isinstance(row, dict) else row[0]
|
||||
if next_parent:
|
||||
_rollup_parent_status(cur, tenant_id=tenant_id, parent_task_id=str(next_parent))
|
||||
|
||||
|
||||
def create_task(
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user