From bb0f8a290524c412e3629d66d53424f6f0bbbf91 Mon Sep 17 00:00:00 2001 From: Christoph Kluge Date: Wed, 5 Oct 2022 11:16:43 +0200 Subject: [PATCH] Fix compilation - Unit.Prefix prop used in assignement instead if Unit type --- internal/repository/init.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/repository/init.go b/internal/repository/init.go index 554d88b..496b1d3 100644 --- a/internal/repository/init.go +++ b/internal/repository/init.go @@ -389,10 +389,10 @@ 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, &newUnit) + units.NormalizeSeries(fp, avg, metric.Unit.Prefix, &newUnit) s.Data = schema.GetFloat64ToFloat(fp) } - metric.Unit = newUnit + metric.Unit.Prefix = newUnit } } }