This commit is contained in:
DanB
2016-03-01 14:11:05 +01:00
2 changed files with 0 additions and 6 deletions

View File

@@ -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{

View File

@@ -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