From: Jo-Philipp Wich Date: Wed, 13 Nov 2019 16:08:58 +0000 (+0100) Subject: luci-app-nlbwon: fix parsing relative interval values from config X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=bc060f931b9595dde43f18ab5446df2d66a83ea1;p=oweals%2Fluci.git luci-app-nlbwon: fix parsing relative interval values from config Fixes: #3302 Signed-off-by: Jo-Philipp Wich (cherry picked from commit 2e8aa301aa2a1aa07438de8dd962c21f0c8559f2) --- diff --git a/applications/luci-app-nlbwmon/luasrc/model/cbi/nlbw/config.lua b/applications/luci-app-nlbwmon/luasrc/model/cbi/nlbw/config.lua index 71e096c61..08df5b332 100644 --- a/applications/luci-app-nlbwmon/luasrc/model/cbi/nlbw/config.lua +++ b/applications/luci-app-nlbwmon/luasrc/model/cbi/nlbw/config.lua @@ -72,8 +72,8 @@ interval:depends("_period", "relative") interval.write = period.write interval.cfgvalue = function(self, cfg) - local val = m:get(cfg, "database_interval") - return val and tonumber(val) + local val = tonumber(m:get(cfg, "database_interval")) + return val and tostring(val) end