diff options
Diffstat (limited to 'rules')
-rw-r--r-- | rules/controller/selectors.lua | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/rules/controller/selectors.lua b/rules/controller/selectors.lua index 58065fc85..905757c76 100644 --- a/rules/controller/selectors.lua +++ b/rules/controller/selectors.lua @@ -30,11 +30,7 @@ local function handle_check_selector(_, conn, req_params) if req_params.selector then local selector = lua_selectors.create_selector_closure(rspamd_config, req_params.selector, '', true) - if not selector then - conn:send_error(500, 'invalid selector') - else - conn:send_ucl({success = true}) - end + conn:send_ucl({success = selector and true}) else conn:send_error(404, 'missing selector') end @@ -74,4 +70,4 @@ return { enable = true, need_task = true, } -}
\ No newline at end of file +} |