diff --git a/crm/repository/record_report_builder.go b/crm/repository/record_report_builder.go index 43e152490..8a2be4ea9 100644 --- a/crm/repository/record_report_builder.go +++ b/crm/repository/record_report_builder.go @@ -164,8 +164,11 @@ func (b recordReportBuilder) Cast(row sqlx.ColScanner) map[string]interface{} { } // Cast all metrics to float64 - for _, numeric := range b.numerics { - out[numeric], _ = strconv.ParseFloat(out[numeric].(string), 64) + for _, fname := range b.numerics { + switch num := out[fname].(type) { + case string: + out[fname], _ = strconv.ParseFloat(num, 64) + } } return out