From 20d2cee4252a60aaf501f1a753c1660bd870e012 Mon Sep 17 00:00:00 2001 From: rbarrabe Date: Tue, 22 Nov 2016 10:54:44 +0100 Subject: [PATCH] Delete accountID only if it exist --- engine/action.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/action.go b/engine/action.go index f9b64ae98..d32fab9a5 100644 --- a/engine/action.go +++ b/engine/action.go @@ -567,7 +567,7 @@ func removeAccountAction(ub *Account, sq *StatsQueueTriggered, a *Action, acs Ac } //var dirtyAps []string for key, ap := range allAPs { - if _, exists := ap.AccountIDs[accID]; !exists { + if _, exists := ap.AccountIDs[accID]; exists { // save action plan delete(ap.AccountIDs, key) ratingStorage.SetActionPlan(key, ap, true, utils.NonTransactional)