case 4582
This commit is contained in:
@@ -75,8 +75,8 @@ namespace AyaNova.Api.Controllers
|
||||
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
||||
UnitBiz biz = UnitBiz.GetBiz(ct, HttpContext);
|
||||
var customerEffectiveRights = await UserBiz.CustomerUserEffectiveRightsAsync(biz.UserId);
|
||||
if (!customerEffectiveRights.CreateUnit)
|
||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||
if (!customerEffectiveRights.CreateUnit)
|
||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||
|
||||
if (!ModelState.IsValid)
|
||||
return BadRequest(new ApiErrorResponse(ModelState));
|
||||
@@ -309,7 +309,12 @@ namespace AyaNova.Api.Controllers
|
||||
{
|
||||
while (dr.Read())
|
||||
{
|
||||
ret.RecentWorkOrders.Add(new RecentWorkOrder(dr.GetInt64(0), dr.GetInt64(1), dr.GetDateTime(2)));
|
||||
|
||||
if (!await dr.IsDBNullAsync(2))//case 4582
|
||||
ret.RecentWorkOrders.Add(new RecentWorkOrder(dr.GetInt64(0), dr.GetInt64(1), dr.GetDateTime(2)));
|
||||
else
|
||||
ret.RecentWorkOrders.Add(new RecentWorkOrder(dr.GetInt64(0), dr.GetInt64(1), null));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user