aboutsummaryrefslogtreecommitdiffstats
path: root/lualib
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2024-08-15 17:55:19 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2024-08-15 17:55:19 +0100
commit6155385f69769bf04832ad3708849ab5cd054322 (patch)
tree72216e53d206010ae691057a6f613924a1d5126d /lualib
parent1e2c58a2e87d9261cecf3e063f57aa3455e5c21f (diff)
downloadrspamd-6155385f69769bf04832ad3708849ab5cd054322.tar.gz
rspamd-6155385f69769bf04832ad3708849ab5cd054322.zip
[Minor] Sime minor changes
Diffstat (limited to 'lualib')
-rw-r--r--lualib/lua_cfg_transform.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/lualib/lua_cfg_transform.lua b/lualib/lua_cfg_transform.lua
index b928cd88a..43487ea52 100644
--- a/lualib/lua_cfg_transform.lua
+++ b/lualib/lua_cfg_transform.lua
@@ -188,7 +188,7 @@ return function(cfg)
local action_score
local act = actions:at(d)
- if act:type() == 'number' then
+ if act:type() ~= 'object' then
action_score = act:unwrap()
elseif act:type() == 'object' and act:at('score') then
action_score = act:at('score'):unwrap()
@@ -232,7 +232,7 @@ return function(cfg)
for i = 1, (#actions_order - 1) do
local act = actions_order[i]
- if actions:at(act) and actions:at(act):type() == 'number' then
+ if actions:at(act) and actions:at(act):type() ~= 'object' then
local score = actions:at(act):unwrap()
for j = i + 1, #actions_order do