luci-app-travelmate: bugfix add/editing WPA3 uplinks

* see forum post
https://forum.openwrt.org/t/travelmate-support-thread/5155/318

Signed-off-by: Dirk Brenken <dev@brenken.org>
(cherry picked from commit 9ca877e08e)
This commit is contained in:
Dirk Brenken 2020-01-18 06:28:14 +01:00
parent 5baeb64b49
commit 8f57e814d9
No known key found for this signature in database
GPG key ID: 9D71CD547BFAE684
2 changed files with 2 additions and 2 deletions

View file

@ -199,7 +199,7 @@ function wssid.write(self, section, value)
elseif encr:formvalue(section) ~= "owe" then
uci:set("wireless", newsection, "key", wkey:formvalue(section) or "")
end
if ciph and ciph:formvalue(section) ~= "auto" then
if ciph and ciph:formvalue(section) and ciph:formvalue(section) ~= "auto" then
uci:set("wireless", newsection, "encryption", encr:formvalue(section) .. "+" .. ciph:formvalue(section))
else
uci:set("wireless", newsection, "encryption", encr:formvalue(section))

View file

@ -182,7 +182,7 @@ function wssid.write(self, section, value)
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
if ciph and ciph:formvalue(section) and ciph:formvalue(section) ~= "auto" then
uci:set("wireless", m.hidden.cfg, "encryption", encr:formvalue(section) .. "+" .. ciph:formvalue(section))
else
uci:set("wireless", m.hidden.cfg, "encryption", encr:formvalue(section))