Started shared balances logic

This commit is contained in:
Radu Ioan Fericean
2014-01-07 22:34:40 +02:00
parent 99a9b2c987
commit 58ddae9b70
13 changed files with 206 additions and 43 deletions

View File

@@ -335,7 +335,7 @@ func (csvr *CSVReader) LoadDestinationRates() (err error) {
}
}
if !destinationExists {
if dbExists, err := csvr.dataStorage.ExistsData(DESTINATION_PREFIX, record[1]); err != nil {
if dbExists, err := csvr.dataStorage.DataExists(DESTINATION_PREFIX, record[1]); err != nil {
return err
} else if !dbExists {
return fmt.Errorf("Could not get destination for tag %v", record[1])
@@ -418,7 +418,7 @@ func (csvr *CSVReader) LoadRatingProfiles() (err error) {
}
_, exists := csvr.ratingPlans[record[5]]
if !exists {
if dbExists, err := csvr.dataStorage.ExistsData(RATING_PLAN_PREFIX, record[5]); err != nil {
if dbExists, err := csvr.dataStorage.DataExists(RATING_PLAN_PREFIX, record[5]); err != nil {
return err
} else if !dbExists {
return errors.New(fmt.Sprintf("Could not load rating plans for tag: %v", record[5]))