fix devision by zero exception

This commit is contained in:
Фролов 2021-05-25 11:49:56 +05:00
parent 20862228a6
commit 3d3fe0288e

View File

@ -54,7 +54,8 @@ namespace AsbCloudInfrastructure.Services
if (fullDataCount > 1.2 * approxPointsCount)
{
var m = approxPointsCount / fullDataCount;
fullData = fullData.Where(d => d.Id % m == 0);
if(m > 0)
fullData = fullData.Where(d => d.Id % m == 0);
}
var dbData = fullData.ToList();