From e76caf18bf856967facb51546e0c90fca9b692ae Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 30 Apr 2019 09:05:16 +0200 Subject: [PATCH] luci-base: luci.model.network: simplify is_auto() Signed-off-by: Jo-Philipp Wich --- modules/luci-base/luasrc/model/network.lua | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/modules/luci-base/luasrc/model/network.lua b/modules/luci-base/luasrc/model/network.lua index dec25a5d0..67a2de4ed 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) -- 2.25.1