luci-base: fix luci.model.uci.get_first()
Properly propagate the config parameter to the foreach iterator in order to fix get_first() lookups. Fixes #1734. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
646545da56
commit
8c636c87ee
1 changed files with 1 additions and 1 deletions
|
@ -242,7 +242,7 @@ end
|
|||
function get_first(self, config, stype, option, default)
|
||||
local rv = default
|
||||
|
||||
self:foreach(conf, stype, function(s)
|
||||
self:foreach(config, stype, function(s)
|
||||
local val = not option and s[".name"] or s[option]
|
||||
|
||||
if type(default) == "number" then
|
||||
|
|
Loading…
Reference in a new issue