diff options
Diffstat (limited to 'applications/luci-app-openvpn/luasrc/model/cbi/openvpn.lua')
-rw-r--r-- | applications/luci-app-openvpn/luasrc/model/cbi/openvpn.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn.lua b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn.lua index 8f4859c0e..ad607ae6c 100644 --- a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn.lua +++ b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn.lua @@ -14,8 +14,8 @@ s.template_addremove = "openvpn/cbi-select-input-add" s.addremove = true s.add_select_options = { } -file_cfg = s:option(DummyValue, "config") -function file_cfg.cfgvalue(self, section) +local cfg = s:option(DummyValue, "config") +function cfg.cfgvalue(self, section) local file_cfg = self.map:get(section, "config") if file_cfg then s.extedit = luci.dispatcher.build_url("admin", "services", "openvpn", "file", "%s") @@ -73,7 +73,9 @@ function s.create(self, name) end end uci:save("openvpn") - luci.http.redirect( self.extedit:format(name) ) + if extedit then + luci.http.redirect( self.extedit:format(name) ) + end end elseif #name > 0 then self.invalid_cts = true |