mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-12 18:46:24 +05:00
Empty call costs in session should not be saved since they break
This commit is contained in:
@@ -160,6 +160,9 @@ func (s *Session) SaveOperations() {
|
||||
go func() {
|
||||
for _, sr := range s.sessionRuns {
|
||||
engine.Logger.Debug(fmt.Sprintf("Saving operations for session %v, runId: %s", s, sr.runId))
|
||||
if len(sr.callCosts) == 0 {
|
||||
break // There are no costs to save, ignore the operation
|
||||
}
|
||||
firstCC := sr.callCosts[0]
|
||||
for _, cc := range sr.callCosts[1:] {
|
||||
firstCC.Merge(cc)
|
||||
|
||||
Reference in New Issue
Block a user