Fix compilation

- Unit.Prefix prop used in assignement instead if Unit type
This commit is contained in:
Christoph Kluge 2022-10-05 11:16:43 +02:00
parent 74c50bd424
commit bb0f8a2905

View File

@ -389,10 +389,10 @@ func checkJobData(d *schema.JobData) error {
for _, s := range metric.Series { for _, s := range metric.Series {
fp := schema.ConvertFloatToFloat64(s.Data) fp := schema.ConvertFloatToFloat64(s.Data)
// Normalize values with new unit prefix // 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) s.Data = schema.GetFloat64ToFloat(fp)
} }
metric.Unit = newUnit metric.Unit.Prefix = newUnit
} }
} }
} }