mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
fix for nil account crash
This commit is contained in:
@@ -158,8 +158,12 @@ func logAction(ub *Account, sq *StatsQueueTriggered, a *Action, acs Actions) (er
|
||||
|
||||
// Used by cdrLogAction to dynamically parse values out of account and action
|
||||
func parseTemplateValue(rsrFlds utils.RSRFields, acnt *Account, action *Action) string {
|
||||
dta, err := utils.NewTAFromAccountKey(acnt.Id) // Account information should be valid
|
||||
if err != nil {
|
||||
var err error
|
||||
var dta *utils.TenantAccount
|
||||
if acnt != nil {
|
||||
dta, err = utils.NewTAFromAccountKey(acnt.Id) // Account information should be valid
|
||||
}
|
||||
if err != nil || acnt == nil {
|
||||
dta = new(utils.TenantAccount) // Init with empty values
|
||||
}
|
||||
var parsedValue string // Template values
|
||||
|
||||
Reference in New Issue
Block a user