mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-24 00:28:44 +05:00
Fixup re-rating not using cost -1
This commit is contained in:
@@ -912,6 +912,9 @@ func (self *SQLStorage) GetStoredCdrs(cgrIds, runIds, tors, cdrHosts, cdrSources
|
||||
SetupTime: setupTime.Time, AnswerTime: answerTime.Time, Duration: time.Duration(usage.Int64),
|
||||
ExtraFields: extraFieldsMp, MediationRunId: runid.String, Cost: cost.Float64,
|
||||
}
|
||||
if !cost.Valid { //There was no cost provided, will fakely insert 0 if we do not handle it and reflect on re-rating
|
||||
storCdr.Cost = -1
|
||||
}
|
||||
cdrs = append(cdrs, storCdr)
|
||||
}
|
||||
return cdrs, nil
|
||||
|
||||
Reference in New Issue
Block a user