mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-25 00:58:45 +05:00
Warning when filters cannot cast to string, fixes #874
This commit is contained in:
@@ -46,7 +46,9 @@ func matchingItemIDsForEvent(ev map[string]interface{}, fieldIDs []string,
|
||||
}
|
||||
fldVal, canCast := utils.CastFieldIfToString(fieldValIf)
|
||||
if !canCast {
|
||||
return nil, fmt.Errorf("Cannot cast field: %s into string", fldName)
|
||||
utils.Logger.Warning(
|
||||
fmt.Sprintf("<%s> cannot cast field: %s into string", utils.FilterS, fldName))
|
||||
continue
|
||||
}
|
||||
dbItemIDs, err := dm.MatchReqFilterIndex(dbIdxKey, fldName, fldVal)
|
||||
if err != nil {
|
||||
|
||||
@@ -626,6 +626,7 @@ const (
|
||||
TBLTPSuppliers = "tp_suppliers"
|
||||
TBLTPAttributes = "tp_attributes"
|
||||
TBLVersions = "versions"
|
||||
FilterS = "FilterS"
|
||||
)
|
||||
|
||||
//Cache Name
|
||||
|
||||
Reference in New Issue
Block a user