From 8c636c87ee14d4d0bac904b23f35b016b8cf19e0 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 7 Apr 2018 14:09:18 +0200 Subject: [PATCH] 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 --- modules/luci-base/luasrc/model/uci.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.25.1