Empty call costs in session should not be saved since they break

This commit is contained in:
DanB
2014-03-12 19:00:21 +01:00
parent c8553e9611
commit e09cc8527e

View File

@@ -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)