Warning when filters cannot cast to string, fixes #874

This commit is contained in:
DanB
2017-12-14 16:51:08 +01:00
parent a516ae49d4
commit c16602ae92
2 changed files with 4 additions and 1 deletions

View File

@@ -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 {

View File

@@ -626,6 +626,7 @@ const (
TBLTPSuppliers = "tp_suppliers"
TBLTPAttributes = "tp_attributes"
TBLVersions = "versions"
FilterS = "FilterS"
)
//Cache Name