mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Remove unused DryRun field from CallDescriptor
dryRun vars will also not be considered anymore in the balance blocker condition. Fixes #4163
This commit is contained in:
committed by
Dan Christian Bogos
parent
1a19fddda1
commit
6722d6b6a4
@@ -419,7 +419,7 @@ func (acc *Account) debitCreditBalance(cd *CallDescriptor, count bool, dryRun bo
|
||||
}
|
||||
}
|
||||
// check for blocker
|
||||
if dryRun && balance.Blocker {
|
||||
if balance.Blocker {
|
||||
return // don't go to next balances
|
||||
}
|
||||
}
|
||||
@@ -452,7 +452,7 @@ func (acc *Account) debitCreditBalance(cd *CallDescriptor, count bool, dryRun bo
|
||||
}
|
||||
}
|
||||
// check for blocker
|
||||
if dryRun && balance.Blocker {
|
||||
if balance.Blocker {
|
||||
return // don't go to next balances
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,7 +134,6 @@ type CallDescriptor struct {
|
||||
RunID string
|
||||
ForceDuration bool // for Max debit if less than duration return err
|
||||
PerformRounding bool // flag for rating info rounding
|
||||
DryRun bool
|
||||
DenyNegativeAccount bool // prevent account going on negative during debit
|
||||
account *Account
|
||||
testCallcost *CallCost // testing purpose only!
|
||||
@@ -770,7 +769,7 @@ func (cd *CallDescriptor) Debit(fltrS *FilterS) (cc *CallCost, err error) {
|
||||
}
|
||||
}
|
||||
return guardian.Guardian.Guard(func() (err error) {
|
||||
cc, err = cd.debit(account, cd.DryRun, !cd.DenyNegativeAccount, fltrS)
|
||||
cc, err = cd.debit(account, false, !cd.DenyNegativeAccount, fltrS)
|
||||
if err == nil {
|
||||
cc.AccountSummary = cd.AccountSummary(initialAcnt)
|
||||
}
|
||||
@@ -834,7 +833,7 @@ func (cd *CallDescriptor) MaxDebit(fltrS *FilterS) (cc *CallCost, err error) {
|
||||
cd.TimeEnd = cd.TimeStart.Add(remainingDuration)
|
||||
cd.DurationIndex -= initialDuration - remainingDuration
|
||||
}
|
||||
cc, err = cd.debit(account, cd.DryRun, !cd.DenyNegativeAccount, fltrS)
|
||||
cc, err = cd.debit(account, false, !cd.DenyNegativeAccount, fltrS)
|
||||
if err == nil {
|
||||
cc.AccountSummary = cd.AccountSummary(initialAcnt)
|
||||
}
|
||||
@@ -998,7 +997,6 @@ func (cd *CallDescriptor) Clone() *CallDescriptor {
|
||||
ToR: cd.ToR,
|
||||
ForceDuration: cd.ForceDuration,
|
||||
PerformRounding: cd.PerformRounding,
|
||||
DryRun: cd.DryRun,
|
||||
CgrID: cd.CgrID,
|
||||
RunID: cd.RunID,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user