forked from ddrilling/AsbCloudServer
fix CalcStat on empty operations list
This commit is contained in:
parent
06a492a5e5
commit
002da70471
@ -195,11 +195,15 @@ namespace AsbCloudInfrastructure.Services
|
|||||||
.Where(o => o.IdWellSectionType == idSectionType)
|
.Where(o => o.IdWellSectionType == idSectionType)
|
||||||
.OrderBy(o => o.Start)
|
.OrderBy(o => o.Start)
|
||||||
.ThenBy(o => o.WellDepth);
|
.ThenBy(o => o.WellDepth);
|
||||||
|
|
||||||
return CalcStat(sectionOperations);
|
return CalcStat(sectionOperations);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static StatOperationsDto CalcStat(IEnumerable<OperationParams> operations)
|
private static StatOperationsDto CalcStat(IEnumerable<OperationParams> operations)
|
||||||
{
|
{
|
||||||
|
if (!operations.Any())
|
||||||
|
return null;
|
||||||
|
|
||||||
var races = GetCompleteRaces(operations);
|
var races = GetCompleteRaces(operations);
|
||||||
|
|
||||||
var section = new StatOperationsDto
|
var section = new StatOperationsDto
|
||||||
|
Loading…
Reference in New Issue
Block a user