diff options
author | Jo-Philipp Wich <jo@mein.io> | 2018-04-07 14:09:18 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2018-04-07 14:09:18 +0200 |
commit | 8c636c87ee14d4d0bac904b23f35b016b8cf19e0 (patch) | |
tree | c73fcf159913f7561d01824bf2cb2d1a267b6945 /modules/luci-base | |
parent | 646545da5665288b4ed2d8b5b852e004ec164a27 (diff) |
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>
Diffstat (limited to 'modules/luci-base')
-rw-r--r-- | modules/luci-base/luasrc/model/uci.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/luci-base/luasrc/model/uci.lua b/modules/luci-base/luasrc/model/uci.lua index 7e1c8f595..0e3950c0b 100644 --- a/modules/luci-base/luasrc/model/uci.lua +++ b/modules/luci-base/luasrc/model/uci.lua @@ -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 |