Browse Source

[Minor] Settings: Another fix of settings application

tags/2.0
Vsevolod Stakhov 4 years ago
parent
commit
5d7ba7b3a6
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      src/plugins/lua/settings.lua

+ 2
- 2
src/plugins/lua/settings.lua View File

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

Loading…
Cancel
Save