luci-app-nlbwon: fix parsing relative interval values from config

Fixes: #3302
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 2e8aa301aa)
This commit is contained in:
Jo-Philipp Wich 2019-11-13 17:08:58 +01:00
parent 640f26238c
commit 9d6b01974e

View file

@ -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