mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-03 18:33:49 +00:00
Fix. Find call_group with NULL in intercept.lua (#2169)
This commit is contained in:
committed by
FusionPBX
parent
679169e8e0
commit
4ba9e89765
@@ -188,9 +188,13 @@
|
||||
sql = sql .. "AND (";
|
||||
for key,call_group in ipairs(call_groups) do
|
||||
if key > 1 then sql = sql .. " OR " end
|
||||
local param_name = "call_group_" .. tostring(key)
|
||||
sql = sql .. "call_group = :" .. param_name;
|
||||
params[param_name] = (#call_group == 0) and '' or ('%' .. call_group .. '%');
|
||||
if #call_group == 0 then
|
||||
sql = sql .. "call_group = '' or call_group is NULL";
|
||||
else
|
||||
local param_name = "call_group_" .. tostring(key)
|
||||
sql = sql .. "call_group = :" .. param_name;
|
||||
params[param_name] = '%' .. call_group .. '%';
|
||||
end
|
||||
end
|
||||
sql = sql .. ") ";
|
||||
if (debug["sql"]) then
|
||||
|
||||
Reference in New Issue
Block a user