RatingProfiles.csv: removing direction and cdrStatQueueIDs

This commit is contained in:
DanB
2019-02-11 16:42:53 +01:00
parent 9f41b3f9e7
commit 48a518fc99
21 changed files with 130 additions and 145 deletions

View File

@@ -389,7 +389,9 @@ func (self *SQLStorage) SetTPRatingProfiles(rpfs []*utils.TPRatingProfile) error
}
tx := self.db.Begin()
for _, rpf := range rpfs {
if err := tx.Where(&TpRatingProfile{Tpid: rpf.TPid, Loadid: rpf.LoadId, Direction: rpf.Direction, Tenant: rpf.Tenant, Category: rpf.Category, Subject: rpf.Subject}).Delete(TpRatingProfile{}).Error; err != nil {
if err := tx.Where(&TpRatingProfile{Tpid: rpf.TPid, Loadid: rpf.LoadId,
Tenant: rpf.Tenant, Category: rpf.Category,
Subject: rpf.Subject}).Delete(TpRatingProfile{}).Error; err != nil {
tx.Rollback()
return err
}
@@ -1226,9 +1228,6 @@ func (self *SQLStorage) GetTPRatingProfiles(filter *utils.TPRatingProfile) ([]*u
if len(filter.LoadId) != 0 {
q = q.Where("loadid = ?", filter.LoadId)
}
if len(filter.Direction) != 0 {
q = q.Where("direction = ?", filter.Direction)
}
if len(filter.Tenant) != 0 {
q = q.Where("tenant = ?", filter.Tenant)
}