mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-22 23:58:44 +05:00
Update migrator tests
This commit is contained in:
committed by
Dan Christian Bogos
parent
858e337c39
commit
7c8f91ee3d
@@ -759,9 +759,12 @@ func (self *SQLStorage) SetSMCost(smc *SMCost) error {
|
||||
|
||||
func (self *SQLStorage) RemoveSMCost(smc *SMCost) error {
|
||||
tx := self.db.Begin()
|
||||
|
||||
if err := tx.Where(&SessionsCostsSQL{Cgrid: smc.CGRID,
|
||||
RunID: smc.RunID}).Delete(SessionsCostsSQL{}).Error; err != nil {
|
||||
var rmParam *SessionsCostsSQL
|
||||
if smc != nil {
|
||||
rmParam = &SessionsCostsSQL{Cgrid: smc.CGRID,
|
||||
RunID: smc.RunID}
|
||||
}
|
||||
if err := tx.Where(rmParam).Delete(SessionsCostsSQL{}).Error; err != nil {
|
||||
tx.Rollback()
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user