Fix superfluous metric point

This commit is contained in:
Jordy van Dortmont
2018-03-27 14:55:39 +02:00
parent 0ebaa395c0
commit 7e00b6fb88

View File

@@ -63,7 +63,7 @@ class MetricRepository
$pointKey = $dateTime->format('Y-m-d H:i');
$points = $this->repository->getPointsSinceMinutes($metric, 60)->pluck('value', 'key')->take(60);
for ($i = 0; $i <= 60; $i++) {
for ($i = 0; $i < 60; $i++) {
if (!$points->has($pointKey)) {
$points->put($pointKey, $metric->default_value);
}