fix(workbench): serialize events and target work order sync
This commit is contained in:
@@ -122,12 +122,17 @@ async def list_operational_tasks(
|
||||
task_status: TaskStatus | None = Query(default=None, alias="status"),
|
||||
limit: int = Query(default=50, ge=1, le=100),
|
||||
offset: int = Query(default=0, ge=0),
|
||||
peripheral_work_order_id: UUID | None = Query(
|
||||
default=None, description="Only tasks sourced from or linked to this peripheral work order",
|
||||
),
|
||||
ctx: ProjectContext = Depends(require_permission(OPERATIONAL_TASK_VIEW)),
|
||||
conn: AsyncConnection = Depends(get_project_pg_connection),
|
||||
):
|
||||
try:
|
||||
items, next_offset = await _service(ctx, conn).list(
|
||||
task_type=task_type, status=task_status, limit=limit, offset=offset
|
||||
task_type=task_type, status=task_status, limit=limit, offset=offset,
|
||||
**({"peripheral_work_order_id": peripheral_work_order_id}
|
||||
if peripheral_work_order_id is not None else {}),
|
||||
)
|
||||
return OperationalTaskPage(
|
||||
items=items, limit=limit, offset=offset, next_offset=next_offset
|
||||
|
||||
Reference in New Issue
Block a user