Fix bad operator error with empty config

Fixes #3290
This commit is contained in:
emanuele-f 2020-01-22 16:02:12 +01:00
parent cd6af05134
commit 8a6392cd23

View file

@ -1087,7 +1087,7 @@ function http_lint.validateHookConfig(script, hook, value)
local mandatory_fields = {}
if(input_builder == "threshold_cross") then
if(not validateOperator(conf.operator)) then
if(value.enabled and (not validateOperator(conf.operator))) then
return false, "bad operator"
end