MCPcopy
hub / github.com/IBM/AssetOpsBench / get_workorder

Function get_workorder

src/servers/wo/main.py:130–141  ·  view source on GitHub ↗

Get a single work order by number and site.

(
    wonum: str, site_id: str
)

Source from the content-addressed store, hash-verified

128
129
130async def get_workorder(
131 wonum: str, site_id: str
132) -> Union[WorkOrderResult, ErrorResult]:
133 """Get a single work order by number and site."""
134 res = await wo.get_workorder(db(), wonum, site_id)
135 err = _failed(res)
136 if err:
137 return err
138 return WorkOrderResult(
139 work_order=WorkOrderItem.model_validate(res["data"]),
140 message=f"Work order {wonum} at {site_id}.",
141 )
142
143
144async def get_workorder_tasks(

Callers

nothing calls this directly

Calls 3

dbFunction · 0.85
_failedFunction · 0.85
WorkOrderResultClass · 0.85

Tested by

no test coverage detected