mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Fix nested values in the default configset growing the JSON
This commit is contained in:
parent
3ac3b99fdb
commit
3111b4a6e7
1 changed files with 10 additions and 1 deletions
|
|
@ -1258,7 +1258,16 @@ end
|
|||
function user_scripts.loadDefaultConfig()
|
||||
local ifid = getSystemInterfaceId()
|
||||
local configsets = user_scripts.getConfigsets()
|
||||
local default_conf = configsets[user_scripts.DEFAULT_CONFIGSET_ID] or {}
|
||||
local default_conf = configsets[user_scripts.DEFAULT_CONFIGSET_ID]
|
||||
|
||||
if default_conf then
|
||||
default_conf = default_conf.config or {}
|
||||
|
||||
-- Drop possible nested values due to a previous bug
|
||||
default_conf.config = nil
|
||||
else
|
||||
default_conf = {}
|
||||
end
|
||||
|
||||
for type_id, script_type in pairs(user_scripts.script_types) do
|
||||
for _, subdir in pairs(script_type.subdirs) do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue