luci-app-travelmate: fix logical glitch
authorDirk Brenken <dev@brenken.org>
Tue, 22 Oct 2019 19:43:11 +0000 (21:43 +0200)
committerDirk Brenken <dev@brenken.org>
Wed, 23 Oct 2019 04:27:39 +0000 (06:27 +0200)
* fix logical glitch in last commit for WEP/EAP stations

Signed-off-by: Dirk Brenken <dev@brenken.org>
(cherry picked from commit 2914547347ef7a2842878a895d6fc233a9212cca)

applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_edit.lua

index ef97e26a25a99c024e6900f6ab2210af067eed10..086853171e4b51771d4b52a1903709b24d1341d5 100644 (file)
@@ -177,8 +177,7 @@ function wssid.write(self, section, value)
                        uci:set("wireless", m.hidden.cfg, "client_cert", clientcert:formvalue(section) or "")
                        uci:set("wireless", m.hidden.cfg, "priv_key", privkey:formvalue(section) or "")
                        uci:set("wireless", m.hidden.cfg, "priv_key_pwd", privkeypwd:formvalue(section) or "")
-               end
-               if encr:formvalue(section) ~= "owe" then
+               elseif encr:formvalue(section) ~= "owe" then
                        uci:set("wireless", m.hidden.cfg, "key", wkey:formvalue(section) or "")
                end
                if ciph and ciph:formvalue(section) ~= "auto" then