From 7222fc07d1f68e204ca0692bcf46aeb307474f3e Mon Sep 17 00:00:00 2001
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Thu, 2 Mar 2017 15:09:49 +0100
Subject: [PATCH] gluon-web-private-wifi: fix default value of "enabled"
 setting

---
 .../luasrc/lib/gluon/web/model/admin/privatewifi.lua            | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/gluon-web-private-wifi/luasrc/lib/gluon/web/model/admin/privatewifi.lua b/package/gluon-web-private-wifi/luasrc/lib/gluon/web/model/admin/privatewifi.lua
index 5e8095e43..731b94ea1 100644
--- a/package/gluon-web-private-wifi/luasrc/lib/gluon/web/model/admin/privatewifi.lua
+++ b/package/gluon-web-private-wifi/luasrc/lib/gluon/web/model/admin/privatewifi.lua
@@ -14,7 +14,7 @@ local s = f:section(Section, nil, translate(
 ))
 
 local enabled = s:option(Flag, "enabled", translate("Enabled"))
-enabled.default = (ssid and not uci:get_bool('wireless', primary_iface, "disabled"))
+enabled.default = uci:get('wireless', primary_iface) and not uci:get_bool('wireless', primary_iface, "disabled")
 
 local ssid = s:option(Value, "ssid", translate("Name (SSID)"))
 ssid:depends(enabled, true)
-- 
GitLab