fix CalcStat on empty operations list

This commit is contained in:
Фролов 2021-08-29 12:05:43 +05:00
parent 06a492a5e5
commit 002da70471

View File

@ -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<OperationParams> operations)
{
if (!operations.Any())
return null;
var races = GetCompleteRaces(operations);
var section = new StatOperationsDto