mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-15 21:29:52 +05:00
Resolve issue where a panic would occur when cost is nil
This commit is contained in:
committed by
Dan Christian Bogos
parent
609b2230ea
commit
f85f0c096b
@@ -70,9 +70,9 @@ func populateCostForRoutes(ctx *context.Context, cfg *config.CGRConfig,
|
||||
}
|
||||
if acntCost.Concretes != nil {
|
||||
cost = acntCost.Concretes
|
||||
}
|
||||
if costFloat64, _ := cost.Float64(); extraOpts.maxCost != 0 && costFloat64 > extraOpts.maxCost {
|
||||
continue
|
||||
if costFloat64, _ := cost.Float64(); extraOpts.maxCost != 0 && costFloat64 > extraOpts.maxCost {
|
||||
continue
|
||||
}
|
||||
}
|
||||
acntIDs := make([]string, 0, len(acntCost.Accounts))
|
||||
for acntID := range acntCost.Accounts {
|
||||
|
||||
Reference in New Issue
Block a user