diff --git a/AsbCloudInfrastructure/Services/WellOperationService/OperationsStatService.cs b/AsbCloudInfrastructure/Services/WellOperationService/OperationsStatService.cs index effeeae2..90dc885a 100644 --- a/AsbCloudInfrastructure/Services/WellOperationService/OperationsStatService.cs +++ b/AsbCloudInfrastructure/Services/WellOperationService/OperationsStatService.cs @@ -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 {