From ec772f5aff21d3b2c87925d044979b35b38241c0 Mon Sep 17 00:00:00 2001 From: Christoph Kluge Date: Wed, 5 Oct 2022 14:09:11 +0200 Subject: [PATCH] Fix the fix Note: Changes should be removed before merge - Fix to allow compilation only --- internal/repository/init.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/repository/init.go b/internal/repository/init.go index 496b1d3..e813b44 100644 --- a/internal/repository/init.go +++ b/internal/repository/init.go @@ -389,10 +389,11 @@ func checkJobData(d *schema.JobData) error { for _, s := range metric.Series { fp := schema.ConvertFloatToFloat64(s.Data) // Normalize values with new unit prefix - units.NormalizeSeries(fp, avg, metric.Unit.Prefix, &newUnit) + oldUnit := metric.Unit.Base + units.NormalizeSeries(fp, avg, oldUnit, &newUnit) s.Data = schema.GetFloat64ToFloat(fp) } - metric.Unit.Prefix = newUnit + metric.Unit.Base = newUnit } } }