From: Jo-Philipp Wich Date: Tue, 30 Apr 2019 07:05:16 +0000 (+0200) Subject: luci-base: luci.model.network: simplify is_auto() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=e76caf18bf856967facb51546e0c90fca9b692ae;p=project%2Fluci.git luci-base: luci.model.network: simplify is_auto() Signed-off-by: Jo-Philipp Wich --- diff --git a/modules/luci-base/luasrc/model/network.lua b/modules/luci-base/luasrc/model/network.lua index dec25a5d0b..67a2de4ed2 100644 --- a/modules/luci-base/luasrc/model/network.lua +++ b/modules/luci-base/luasrc/model/network.lua @@ -1160,13 +1160,7 @@ function protocol.is_dynamic(self) end function protocol.is_auto(self) - local auto = self:_get("auto") - - if auto == "0" then - return false - else - return true - end + return (self:_get("auto") ~= "0") end function protocol.is_alias(self)