summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/lua/settings.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/lua/settings.lua b/src/plugins/lua/settings.lua
index e3e4b8986..de9ac5c65 100644
--- a/src/plugins/lua/settings.lua
+++ b/src/plugins/lua/settings.lua
@@ -454,14 +454,14 @@ local function check_settings(task)
-- Extract static settings
local cached = lua_settings.settings_by_id(s.rule.id)
- if not cached then
+ if not cached or not cached.settings or not cached.settings.apply then
rspamd_logger.errx(task, 'unregistered settings id found: %s!', s.rule.id)
else
rspamd_logger.infox(task, "<%s> apply static settings %s (id = %s); %s matched",
task:get_message_id(),
cached.name, s.rule.id,
table.concat(matched, ','))
- apply_settings(task, cached.settings, s.rule.id)
+ apply_settings(task, cached.settings.apply, s.rule.id)
end
else