This commit is contained in:
DanB
2013-08-04 23:17:34 +02:00
2 changed files with 3 additions and 3 deletions

View File

@@ -266,7 +266,7 @@ func (cd *CallDescriptor) GetCost() (*CallCost, error) {
destPrefix, err := cd.LoadActivationPeriods()
if err != nil {
Logger.Err(fmt.Sprintf("error getting cost for key %v: %v", cd.GetUserBalanceKey(), err))
return &CallCost{}, err
return &CallCost{Cost: -1}, err
}
timespans := cd.splitInTimeSpans(nil)
cost := 0.0

View File

@@ -134,7 +134,7 @@ func (ms *MongoStorage) GetRatingProfile(key string) (rp *RatingProfile, err err
func (ms *MongoStorage) SetRatingProfile(rp *RatingProfile) error {
if historyScribe != nil {
response := 0
go historyScribe.Record(&history.Record{RATING_PROFILE_PREFIX + rp.Id, rp}, &response)
historyScribe.Record(&history.Record{RATING_PROFILE_PREFIX + rp.Id, rp}, &response)
}
return ms.db.C("ratingprofiles").Insert(rp)
}
@@ -151,7 +151,7 @@ func (ms *MongoStorage) GetDestination(key string) (result *Destination, err err
func (ms *MongoStorage) SetDestination(dest *Destination) error {
if historyScribe != nil {
response := 0
go historyScribe.Record(&history.Record{DESTINATION_PREFIX + dest.Id, dest}, &response)
historyScribe.Record(&history.Record{DESTINATION_PREFIX + dest.Id, dest}, &response)
}
return ms.db.C("destinations").Insert(dest)
}