mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-16 13:49:53 +05:00
fix RemActionTiming API
This commit is contained in:
@@ -93,8 +93,9 @@ func (self *ApierV1) RemActionTiming(attrs AttrRemActionTiming, reply *string) e
|
||||
return 0, utils.ErrNotFound
|
||||
}
|
||||
|
||||
if attrs.ActionPlanId != "" { // delete the entire action plan
|
||||
ap.ActionTimings = nil // will delete the action plan
|
||||
if attrs.Tenant != "" && attrs.Account != "" {
|
||||
accID := utils.AccountKey(attrs.Tenant, attrs.Account)
|
||||
delete(ap.AccountIDs, accID)
|
||||
return 0, self.RatingDb.SetActionPlan(ap.Id, ap, true)
|
||||
}
|
||||
|
||||
@@ -109,9 +110,8 @@ func (self *ApierV1) RemActionTiming(attrs AttrRemActionTiming, reply *string) e
|
||||
return 0, self.RatingDb.SetActionPlan(ap.Id, ap, true)
|
||||
}
|
||||
|
||||
if attrs.Tenant != "" && attrs.Account != "" {
|
||||
accID := utils.AccountKey(attrs.Tenant, attrs.Account)
|
||||
delete(ap.AccountIDs, accID)
|
||||
if attrs.ActionPlanId != "" { // delete the entire action plan
|
||||
ap.ActionTimings = nil // will delete the action plan
|
||||
return 0, self.RatingDb.SetActionPlan(ap.Id, ap, true)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user