Merge pull request #5472 from avin3sh/feature_luci-app-unbound_handle_nil

luci-app-unbound: fix error on empty leasetrigger
This commit is contained in:
Jo-Philipp Wich 2021-10-31 13:42:43 +01:00 committed by GitHub
commit 30e32071c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,7 +19,7 @@ local ds = require "luci.dispatcher"
local ucl = luci.model.uci.cursor() local ucl = luci.model.uci.cursor()
local valman = ucl:get_first("unbound", "unbound", "manual_conf") local valman = ucl:get_first("unbound", "unbound", "manual_conf")
local dhcplk = ucl:get_first("unbound", "unbound", "dhcp_link") local dhcplk = ucl:get_first("unbound", "unbound", "dhcp_link")
local lstrig = ucl:get_first("dhcp", "odhcpd", "leasetrigger") local lstrig = ucl:get_first("dhcp", "odhcpd", "leasetrigger") or "undefined"
m1 = Map("unbound") m1 = Map("unbound")
s1 = m1:section(TypedSection, "unbound", translate("Recursive DNS"), s1 = m1:section(TypedSection, "unbound", translate("Recursive DNS"),