From 20d2d59e9bd3f2c479fc1ff9b290fa683bea8268 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 9 Apr 2025 10:06:27 -0600 Subject: [PATCH] Fix call block increment count --- app/switch/resources/scripts/app/call_block/index.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/switch/resources/scripts/app/call_block/index.lua b/app/switch/resources/scripts/app/call_block/index.lua index 73f23201c0..e47ef4fd2d 100644 --- a/app/switch/resources/scripts/app/call_block/index.lua +++ b/app/switch/resources/scripts/app/call_block/index.lua @@ -243,7 +243,11 @@ --update the call block count if (call_block) then sql = "update v_call_block "; - sql = sql .. "set call_block_count = call_block_count + 1 "; + if (call_block_count == nil or call_block_count == '') then + sql = sql .. "set call_block_count = '1' "; + else + sql = sql .. "set call_block_count = call_block_count + 1 "; + end sql = sql .. "where call_block_uuid = :call_block_uuid "; local params = {call_block_uuid = call_block_uuid}; if (debug["sql"]) then