fix wrong NOT_FOUND error when removing account

This commit is contained in:
Radu Ioan Fericean
2016-03-14 23:52:45 +02:00
parent cbf68b98ca
commit 2d47552c52

View File

@@ -157,6 +157,9 @@ func (self *ApierV1) SetAccount(attr utils.AttrSetAccount, reply *string) error
// clean previous action plans
actionPlansMap, err := self.RatingDb.GetAllActionPlans()
if err != nil {
if err == utils.ErrNotFound { // if no action plans just continue
return 0, nil
}
return 0, err
}
var dirtyAps []string