mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-25 00:58:45 +05:00
RatingProfiles.csv: removing direction and cdrStatQueueIDs
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user