summaryrefslogtreecommitdiffhomepage
path: root/libs/cbi/luasrc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/cbi/luasrc')
-rw-r--r--libs/cbi/luasrc/cbi.lua11
1 files changed, 10 insertions, 1 deletions
diff --git a/libs/cbi/luasrc/cbi.lua b/libs/cbi/luasrc/cbi.lua
index 543c895af..2585e5459 100644
--- a/libs/cbi/luasrc/cbi.lua
+++ b/libs/cbi/luasrc/cbi.lua
@@ -1065,7 +1065,8 @@ function ListValue.__init__(self, ...)
end
for k, v in pairs(vs.values) do
local deps = {}
- if vs.enum_depends and vs.enum_depends[k] then
+ if not self.override_dependencies
+ and vs.enum_depends and vs.enum_depends[k] then
for i, dep in ipairs(vs.enum_depends[k]) do
table.insert(deps, _uvl_strip_remote_dependencies(dep))
end
@@ -1077,6 +1078,10 @@ function ListValue.__init__(self, ...)
end
function ListValue.value(self, key, val, ...)
+ if luci.util.contains(self.keylist, key) then
+ return
+ end
+
val = val or key
table.insert(self.keylist, tostring(key))
table.insert(self.vallist, tostring(val))
@@ -1123,6 +1128,10 @@ function MultiValue.render(self, ...)
end
function MultiValue.value(self, key, val)
+ if luci.util.contains(self.keylist, key) then
+ return
+ end
+
val = val or key
table.insert(self.keylist, tostring(key))
table.insert(self.vallist, tostring(val))