diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index eb9eec28..650908d7 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -2325,8 +2325,8 @@ namespace Myshipping.Application #region ATD if (item.Status == "ATD") { - var o = _rep.AsQueryable().Filter(null, true).Where(x => x.Id == item.BookingId).FirstAsync().Result; - var oldatd = o.ATD; + var o = _rep.AsQueryable().Filter(null, true).Where(x => x.Id == item.BookingId).First(); + var oldatd = o==null?null:o.ATD; if (oldatd != item.OpTime) { o.ATD = item.OpTime;