luci-app-unbound: fix error on empty leasetrigger
authorAvinesh Singh <[email protected]>
Sat, 30 Oct 2021 08:55:13 +0000 (14:25 +0530)
committerAvinesh Singh <[email protected]>
Sat, 30 Oct 2021 08:55:18 +0000 (14:25 +0530)
Signed-off-by: Avinesh Singh <[email protected]>
applications/luci-app-unbound/luasrc/model/cbi/unbound/configure.lua

index a1b366153631ce650c726da3129030b8bbf6ac11..acbd7c2aedcf18e529f77804f7b72ef3fb0ab92d 100644 (file)
@@ -19,7 +19,7 @@ local ds = require "luci.dispatcher"
 local ucl = luci.model.uci.cursor()
 local valman = ucl:get_first("unbound", "unbound", "manual_conf")
 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")
 s1 = m1:section(TypedSection, "unbound", translate("Recursive DNS"),