Fix: Added null check for cluster stats with no operations

This commit is contained in:
Харченко Владимир 2022-01-25 15:00:17 +05:00
parent e1afec1810
commit 52c8f6a79b

View File

@ -226,7 +226,7 @@ namespace AsbCloudInfrastructure.Services.WellOperationService
var operationsPlan = operations.Where(o => o.IdType == idOperationTypePlan);
var operationsFact = operations.Where(o => o.IdType == idOperationTypeFact);
var factEnd = CalcStat(operationsFact, timezoneOffsetH);
if (idWellState != 2)
if (factEnd is not null && idWellState != 2)
factEnd.End = null;
var section = new PlanFactBase<StatOperationsDto>
{