diff options
author | Jo-Philipp Wich <jo@mein.io> | 2019-04-30 09:05:16 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2019-04-30 09:06:10 +0200 |
commit | e76caf18bf856967facb51546e0c90fca9b692ae (patch) | |
tree | 8a6ba0fe559a19847989a0334fe3aa09983fd452 /modules | |
parent | 1b79446fdf2a384e2fe16b64890fee09d3824101 (diff) |
luci-base: luci.model.network: simplify is_auto()
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/luci-base/luasrc/model/network.lua | 8 |
1 files changed, 1 insertions, 7 deletions
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) |