]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Sime minor changes
authorVsevolod Stakhov <vsevolod@rspamd.com>
Thu, 15 Aug 2024 16:55:19 +0000 (17:55 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Thu, 15 Aug 2024 16:55:19 +0000 (17:55 +0100)
lualib/lua_cfg_transform.lua

index b928cd88a3de08f991969ebece67f38a54192041..43487ea529749a4995416a3abeb3cef1a15a0cdc 100644 (file)
@@ -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