X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=libs%2Fcbi%2Fluasrc%2Fcbi.lua;h=0808fb1b7e69e2fee2164d86fd089f5a851d3a47;hp=f733560caf88e1395b9a788c83a3aa98c755acec;hb=6b6359a7efb61bf837c0c7ca0eedbaa457778cfe;hpb=076f2f84264eca344e4b8e4ec2ab5c23298f6190 diff --git a/libs/cbi/luasrc/cbi.lua b/libs/cbi/luasrc/cbi.lua index f733560ca..0808fb1b7 100644 --- a/libs/cbi/luasrc/cbi.lua +++ b/libs/cbi/luasrc/cbi.lua @@ -1095,7 +1095,7 @@ function AbstractValue.__init__(self, map, section, option, ...) --self.cast = "string" self.track_missing = false - --self.rmempty = false + self.rmempty = true self.default = nil self.size = nil self.optional = false @@ -1106,9 +1106,6 @@ function AbstractValue.prepare(self) if not self.override_scheme and self.map:get_scheme(self.section.sectiontype, self.option) then local vs = self.map:get_scheme(self.section.sectiontype, self.option) - if self.rmempty == nil then - self.rmempty = not vs.required - end if self.cast == nil then self.cast = (vs.type == "list") and "list" or "string" end