mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-16 13:49:53 +05:00
Added Tenant to resources
This commit is contained in:
@@ -588,7 +588,7 @@ func (self *SQLStorage) SetTPStats(sts []*utils.TPStats) error {
|
||||
tx := self.db.Begin()
|
||||
for _, stq := range sts {
|
||||
// Remove previous
|
||||
if err := tx.Where(&TpStats{Tpid: stq.TPid,Tenant: stq.Tenant,Tag: stq.ID}).Delete(TpStats{}).Error; err != nil {
|
||||
if err := tx.Where(&TpStats{Tpid: stq.TPid,Tag: stq.ID}).Delete(TpStats{}).Error; err != nil {
|
||||
tx.Rollback()
|
||||
return err
|
||||
}
|
||||
@@ -1171,8 +1171,6 @@ func (self *SQLStorage) GetTPDestinationRates(tpid, id string, pagination *utils
|
||||
func (self *SQLStorage) GetTPTimings(tpid, id string) ([]*utils.ApierTPTiming, error) {
|
||||
var tpTimings TpTimings
|
||||
q := self.db.Where("tpid = ?", tpid)
|
||||
utils.Logger.Debug(fmt.Sprintf("#1 Id care trimite %s", id))
|
||||
utils.Logger.Debug(fmt.Sprintf("#1 TPId care trimite %s", tpid))
|
||||
if len(id) != 0 {
|
||||
q = q.Where("tag = ?", id)
|
||||
}
|
||||
@@ -1180,7 +1178,6 @@ func (self *SQLStorage) GetTPTimings(tpid, id string) ([]*utils.ApierTPTiming, e
|
||||
return nil, err
|
||||
}
|
||||
ts := tpTimings.AsTPTimings()
|
||||
utils.Logger.Debug(fmt.Sprintf("#2 ce gaseste : %s", ts))
|
||||
if len(ts) == 0 {
|
||||
return ts, utils.ErrNotFound
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user