Add error cecking in set account v2 too

This commit is contained in:
Radu Ioan Fericean
2016-03-15 17:03:33 +02:00
parent 73e977059c
commit bdabfd8633

View File

@@ -115,6 +115,9 @@ func (self *ApierV2) SetAccount(attr AttrSetAccount, reply *string) error {
_, err := engine.Guardian.Guard(func() (interface{}, error) {
actionPlansMap, err := self.RatingDb.GetAllActionPlans()
if err != nil {
if err == utils.ErrNotFound { // if no action plans just continue
return 0, nil
}
return 0, err
}
if attr.ActionPlansOverwrite {