diff options
Diffstat (limited to 'provisioning-model.lua')
-rw-r--r-- | provisioning-model.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/provisioning-model.lua b/provisioning-model.lua index 05dc198..23639ca 100644 --- a/provisioning-model.lua +++ b/provisioning-model.lua @@ -1904,11 +1904,11 @@ mymodule.set_param_options = function(self, options) runsqlcommand(sql, true) -- Loop through the options for i,o in ipairs(options.value.options.value) do - local v,l = string.match(o, "^%s*([^,]+),%s*(.*%S)%s*$") + local v,l = string.match(o, "^%s*([^,]*),%s*(.*%S?)%s*$") if v then - v = string.match(v, "^(.*%S)%s*$") + v = string.match(v, "^(.*%S?)%s*$") else - v = string.match(o, "^%s*(.*%S)%s*$") + v = string.match(o, "^%s*(.*%S?)%s*$") l = v end sql = "INSERT INTO provisioning_options VALUES('"..provdb.escape(options.value.param_id.value).."', '"..provdb.escape(l).."', '"..provdb.escape(v).."', '"..i.."')" |