aboutsummaryrefslogtreecommitdiffstats
path: root/lualib/lua_selectors/transforms.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2022-12-21 11:40:25 +0000
committerVsevolod Stakhov <vsevolod@rspamd.com>2022-12-21 11:40:25 +0000
commit532701a530a30fee3dfb120472e6d4a97f533fc6 (patch)
tree5b2687c793eae6f4b973eef36d9283fdf3d3bd9e /lualib/lua_selectors/transforms.lua
parent97e048959fff2d9db4ad3b2723e97719477a807d (diff)
downloadrspamd-532701a530a30fee3dfb120472e6d4a97f533fc6.tar.gz
rspamd-532701a530a30fee3dfb120472e6d4a97f533fc6.zip
[Fix] Rework lists applications
Diffstat (limited to 'lualib/lua_selectors/transforms.lua')
-rw-r--r--lualib/lua_selectors/transforms.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/lualib/lua_selectors/transforms.lua b/lualib/lua_selectors/transforms.lua
index f6a0b0a37..55e1bffb7 100644
--- a/lualib/lua_selectors/transforms.lua
+++ b/lualib/lua_selectors/transforms.lua
@@ -135,7 +135,7 @@ local transform_function = {
-- Joins tables into a table of strings
['join_tables'] = {
['types'] = {
- ['string_list'] = true
+ ['list'] = true
},
['process'] = function(inp, _, args)
local sep = args[1] or ''
@@ -521,8 +521,7 @@ Empty string comes the first argument or 'true', non-empty string comes nil]],
for _,arg in ipairs(args) do
local meth = inp[arg]
local ret = meth(inp)
- if not ret then return nil end
- table.insert(res, tostring(ret))
+ if ret then table.insert(res, tostring(ret)) end
end
return res,'string_list'
end,