From 2914547347ef7a2842878a895d6fc233a9212cca Mon Sep 17 00:00:00 2001
From: Dirk Brenken <dev@brenken.org>
Date: Tue, 22 Oct 2019 21:43:11 +0200
Subject: luci-app-travelmate: fix logical glitch

* fix logical glitch in last commit for WEP/EAP stations

Signed-off-by: Dirk Brenken <dev@brenken.org>
---
 .../luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_edit.lua      | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

(limited to 'applications/luci-app-travelmate/luasrc/model')

diff --git a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_edit.lua b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_edit.lua
index ef97e26a25..086853171e 100644
--- a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_edit.lua
+++ b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_edit.lua
@@ -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
-- 
cgit v1.2.3