mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-14 12:49:54 +05:00
Merge branch 'master' of https://github.com/cgrates/cgrates
This commit is contained in:
@@ -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{
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user