started work on rating plan activation time handling

This commit is contained in:
Radu Ioan Fericean
2013-11-12 23:57:40 +02:00
parent 5e7f7f6663
commit c6752be776
6 changed files with 167 additions and 79 deletions

View File

@@ -1104,12 +1104,11 @@ func (self *SQLStorage) GetTpRatingProfiles(tpid, tag string) (map[string]*Ratin
if fallback_subject != "" {
for _, fbs := range strings.Split(fallback_subject, ";") {
newKey := fmt.Sprintf("%s:%s:%s:%s", direction, tenant, tor, fbs)
var sslice utils.StringSlice = strings.Split(rp.FallbackKey, ";")
var sslice utils.StringSlice = rp.FallbackKeys
if !sslice.Contains(newKey) {
rp.FallbackKey += newKey + ";"
rp.FallbackKeys = append(rp.FallbackKeys, newKey)
}
}
rp.FallbackKey = strings.TrimRight(rp.FallbackKey, ";")
}
}
return rpfs, nil