Trim fldPath Increments before retrieving one of its fields

This commit is contained in:
ionutboangiu
2023-11-14 06:14:43 -05:00
committed by Dan Christian Bogos
parent 42892eff01
commit 7eeab045a3
2 changed files with 6 additions and 1 deletions

View File

@@ -1094,7 +1094,7 @@ func (ec *EventCost) getChargesForPath(fldPath []string, chr *ChargingInterval)
if fldPath[1] == utils.Accounting {
return ec.getAcountingForPath(fldPath[2:], ec.Accounting[incr.AccountingID])
}
return incr.FieldAsInterface(fldPath)
return incr.FieldAsInterface(fldPath[1:])
}
func (ec *EventCost) getRatingForPath(fldPath []string, rating *RatingUnit) (val any, err error) {