luci-base: luci.model.network: simplify is_auto()

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2019-04-30 09:05:16 +02:00
parent 1b79446fdf
commit e76caf18bf

View file

@ -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)