From 425019ca92ec64280883682b6b80c369d37bf6a2 Mon Sep 17 00:00:00 2001 From: Radu Ioan Fericean Date: Tue, 1 Mar 2016 15:07:01 +0200 Subject: [PATCH] execute actions on disabled accounts --- apier/v1/accounts.go | 2 -- engine/action_plan.go | 4 ---- 2 files changed, 6 deletions(-) diff --git a/apier/v1/accounts.go b/apier/v1/accounts.go index d9b6a7c6c..21131ea16 100644 --- a/apier/v1/accounts.go +++ b/apier/v1/accounts.go @@ -20,7 +20,6 @@ package v1 import ( "fmt" - "log" "math" "strings" "time" @@ -483,7 +482,6 @@ func (self *ApierV1) SetBalance(attr *AttrSetBalance, reply *string) error { expTime = &expTimeVal } accID := utils.AccountKey(attr.Tenant, attr.Account) - log.Print("ACC: ", utils.ToIJSON(attr)) if _, err := self.AccountDb.GetAccount(accID); err != nil { // create account if not exists account := &engine.Account{ diff --git a/engine/action_plan.go b/engine/action_plan.go index b27f7e448..b9c40d519 100644 --- a/engine/action_plan.go +++ b/engine/action_plan.go @@ -303,10 +303,6 @@ func (at *ActionTiming) Execute() (err error) { continue } } - if acc.Disabled && a.ActionType != ENABLE_ACCOUNT { - continue // disabled acocunts are not removed from action plan - //return 0, fmt.Errorf("Account %s is disabled", accID) - } if expDate, parseErr := utils.ParseDate(a.ExpirationString); (a.Balance == nil || a.Balance.HasExpirationDate()) && parseErr == nil && !expDate.IsZero() { a.Balance.ExpirationDate = &time.Time{} *a.Balance.ExpirationDate = expDate