diff --git a/AsbCloudInfrastructure/Services/WellOperationsStatService.cs b/AsbCloudInfrastructure/Services/WellOperationsStatService.cs index 1f608a44..0798c683 100644 --- a/AsbCloudInfrastructure/Services/WellOperationsStatService.cs +++ b/AsbCloudInfrastructure/Services/WellOperationsStatService.cs @@ -195,11 +195,15 @@ namespace AsbCloudInfrastructure.Services .Where(o => o.IdWellSectionType == idSectionType) .OrderBy(o => o.Start) .ThenBy(o => o.WellDepth); + return CalcStat(sectionOperations); } private static StatOperationsDto CalcStat(IEnumerable operations) { + if (!operations.Any()) + return null; + var races = GetCompleteRaces(operations); var section = new StatOperationsDto