libs/core: bring get_first() boolean casting in line with get_bool()
This commit is contained in:
parent
1b94b36498
commit
0f9f2a42a4
1 changed files with 2 additions and 1 deletions
|
@ -184,7 +184,8 @@ function Cursor.get_first(self, conf, stype, opt, def)
|
|||
if type(def) == "number" then
|
||||
val = tonumber(val)
|
||||
elseif type(def) == "boolean" then
|
||||
val = (val == "1" or val == "true" or val == "enabled")
|
||||
val = (val == "1" or val == "true" or
|
||||
val == "yes" or val == "on")
|
||||
end
|
||||
|
||||
if val ~= nil then
|
||||
|
|
Loading…
Reference in a new issue