Initialize recording_description and recording_base64 as a string

This prevents an error inserting a null description and fixes the insert SQL command to fix the insert.
This commit is contained in:
FusionPBX
2023-06-15 17:23:25 -06:00
committed by GitHub
parent 91366eddc5
commit 76e6b5924b

View File

@@ -32,6 +32,8 @@
recording_number = "";
recording_id = "";
recording_prefix = "";
recording_description = "";
recording_base64 = "";
--include config.lua
require "resources.functions.config";
@@ -204,9 +206,7 @@
table.insert(array, "domain_uuid, ");
table.insert(array, "recording_filename, ");
table.insert(array, "recording_description, ");
if (storage_type == "base64") then
table.insert(array, "recording_base64, ");
end
table.insert(array, "recording_base64, ");
table.insert(array, "recording_name ");
table.insert(array, ") ");
table.insert(array, "VALUES ");
@@ -215,9 +215,7 @@
table.insert(array, ":domain_uuid, ");
table.insert(array, ":recording_filename, ");
table.insert(array, ":recording_description, ");
if (storage_type == "base64") then
table.insert(array, ":recording_base64, ");
end
table.insert(array, ":recording_base64, ");
table.insert(array, ":recording_name ");
table.insert(array, ") ");
sql = table.concat(array, "\n");