Fix the fix

Note: Changes should be removed before merge - Fix to allow compilation only
This commit is contained in:
Christoph Kluge 2022-10-05 14:09:11 +02:00
parent bb0f8a2905
commit ec772f5aff

View File

@ -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
}
}
}