diff --git a/app/schemas/schemas.py b/app/schemas/schemas.py index 79cf582..18dcdcc 100644 --- a/app/schemas/schemas.py +++ b/app/schemas/schemas.py @@ -74,7 +74,15 @@ class TaskUpdate(BaseModel): class TaskResponse(TaskBase): id: int - status: TaskStatusEnum + # Read-side is intentionally lenient: legacy/seeded rows can hold a + # task_type or status outside the strict create-time enums (the column is + # a free-form String(32); e.g. a seeded task_type='setup'). Surfacing them + # as plain strings keeps list endpoints from 500-ing on a single + # out-of-enum row — one bad task used to take down `hf task list` + # entirely. Writes stay strict via TaskCreate/_validate_task_type_subtype + # and TaskUpdate (both still use the enums). + task_type: str = "issue" + status: str task_code: Optional[str] = None code: Optional[str] = None type: Optional[str] = None