fix(F): Phase F test fixes — UUID handling, MissingGreenlet, contact_id FK, decompose_goal milestone, success_criteria parent propagation, conftest PermissionsPlugin imports
Check Cross-Plugin Imports / check (push) Has been cancelled
Check Cross-Plugin Imports / check (push) Has been cancelled
This commit is contained in:
@@ -4,7 +4,7 @@ from __future__ import annotations
|
||||
|
||||
import uuid
|
||||
|
||||
from fastapi import APIRouter, Depends, HTTPException, Query, Response, status
|
||||
from fastapi import APIRouter, Depends, HTTPException, Query, Request, Response, status
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
from app.core.db import get_db
|
||||
@@ -242,7 +242,7 @@ async def remove_dependency(
|
||||
@router.post("/{task_id}/decompose", dependencies=[Depends(require_permission("tasks:write"))])
|
||||
async def decompose_goal(
|
||||
task_id: str,
|
||||
body: list[TaskCreate],
|
||||
request: Request,
|
||||
db: AsyncSession = Depends(get_db),
|
||||
current_user: dict = Depends(get_current_user),
|
||||
):
|
||||
@@ -250,8 +250,9 @@ async def decompose_goal(
|
||||
tenant_id = uuid.UUID(current_user["tenant_id"])
|
||||
user_id = uuid.UUID(current_user["user_id"])
|
||||
tid = _parse_uuid(task_id, "task_id")
|
||||
body = await request.json()
|
||||
result = await services.decompose_goal(
|
||||
db, tenant_id, user_id, tid, [item.model_dump() for item in body]
|
||||
db, tenant_id, user_id, tid, body
|
||||
)
|
||||
if result is None:
|
||||
raise HTTPException(404, detail={"detail": "Goal not found", "code": "not_found"})
|
||||
|
||||
Reference in New Issue
Block a user