Update filter rule validation condition

This commit is contained in:
ionutboangiu
2022-03-16 10:25:11 +02:00
committed by Dan Christian Bogos
parent 193ecb5ef6
commit edb985f42d

View File

@@ -284,7 +284,7 @@ func (fltr *FilterRule) IsValid() bool {
return false
}
// Element must be specified only when the type is different from *never
if fltr.Element == utils.EmptyString && fltr.Type != utils.MetaNever {
if fltr.Element == utils.EmptyString {
return fltr.Type == utils.MetaNever
}
if len(fltr.Values) == 0 && !utils.IsSliceMember([]string{utils.MetaExists, utils.MetaNotExists,