summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/luci-base/luasrc/cbi.lua23
1 files changed, 12 insertions, 11 deletions
diff --git a/modules/luci-base/luasrc/cbi.lua b/modules/luci-base/luasrc/cbi.lua
index d275c5b27..971830fe8 100644
--- a/modules/luci-base/luasrc/cbi.lua
+++ b/modules/luci-base/luasrc/cbi.lua
@@ -1199,19 +1199,20 @@ function TypedSection.parse(self, novld)
if name then
-- Ignore if it already exists
if self:cfgvalue(name) then
- name = nil;
- end
-
- name = self:checkscope(name)
-
- if not name then
+ name = nil
self.err_invalid = true
- end
+ else
+ name = self:checkscope(name)
+
+ if not name then
+ self.err_invalid = true
+ end
- if name and #name > 0 then
- created = self:create(name, origin) and name
- if not created then
- self.invalid_cts = true
+ if name and #name > 0 then
+ created = self:create(name, origin) and name
+ if not created then
+ self.invalid_cts = true
+ end
end
end
end