diff --git a/SeaHaven.DataServices/Implementation/UpliftDataService.cs b/SeaHaven.DataServices/Implementation/UpliftDataService.cs index b6f9940..48c0391 100644 --- a/SeaHaven.DataServices/Implementation/UpliftDataService.cs +++ b/SeaHaven.DataServices/Implementation/UpliftDataService.cs @@ -25,13 +25,13 @@ namespace SeaHaven.DataServices.Implementation from v in vendors.DefaultIfEmpty() join ev in _context.VendorCompletionDocuments on u.EvidenceDocumentId equals ev.Id into evidences from ev in evidences.DefaultIfEmpty() - // SH-207: resolve the work order through the same primary-plus-linked - // convention the sibling reads use (GetWorkOrderIdForUpliftAsync, - // GetApprovedExposureForWorkOrdersAsync). A dispatch whose work order is - // linked only through DispatchWorkOrders still surfaces its work-order id, - // flattened WO context, the closed flag, and approved exposure. The - // effective id feeds a single work-order lookup so every field resolves - // from one row. + // SH-207: resolve the work order through the same primary-plus-linked + // convention the sibling reads use (GetWorkOrderIdForUpliftAsync, + // GetApprovedExposureForWorkOrdersAsync). A dispatch whose work order is + // linked only through DispatchWorkOrders still surfaces its work-order id, + // flattened WO context, the closed flag, and approved exposure. The + // effective id feeds a single work-order lookup so every field resolves + // from one row. let effectiveWorkOrderId = d.WorkOrderId ?? d.DispatchWorkOrders!.Select(link => (int?)link.WorkOrderId).FirstOrDefault() let workOrder = _context.workOrders