summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/luasrc/model/network.lua
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2019-04-30 09:05:16 +0200
committerJo-Philipp Wich <jo@mein.io>2019-04-30 09:06:10 +0200
commite76caf18bf856967facb51546e0c90fca9b692ae (patch)
tree8a6ba0fe559a19847989a0334fe3aa09983fd452 /modules/luci-base/luasrc/model/network.lua
parent1b79446fdf2a384e2fe16b64890fee09d3824101 (diff)
luci-base: luci.model.network: simplify is_auto()
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/luasrc/model/network.lua')
-rw-r--r--modules/luci-base/luasrc/model/network.lua8
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)