mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-23 16:18:44 +05:00
handle extra_fields variables with int/float value
This commit is contained in:
@@ -22,6 +22,7 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"reflect"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -97,6 +98,10 @@ func (fsCdr FSCdr) searchExtraField(field string, body map[string]interface{}) (
|
||||
if key == field {
|
||||
return v
|
||||
}
|
||||
case float64:
|
||||
if key == field {
|
||||
return strconv.FormatFloat(v, 'f', -1, 64)
|
||||
}
|
||||
case map[string]interface{}:
|
||||
if result = fsCdr.searchExtraField(field, v); result != "" {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user