luci-app-mwan3: fixing reliability check if value is not configured
authorFlorian Eckert <fe@dev.tdt.de>
Tue, 22 Sep 2020 12:48:01 +0000 (14:48 +0200)
committerFlorian Eckert <fe@dev.tdt.de>
Tue, 22 Sep 2020 12:48:01 +0000 (14:48 +0200)
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
applications/luci-app-mwan3/luasrc/model/cbi/mwan/interface.lua

index dad709ede93977140dcb39d38050d75d8e30009c..d9d21b9ec07e6507c145f9fec2a4c795c48494c1 100644 (file)
@@ -99,7 +99,7 @@ function configCheck()
                        if trackingNumber and #trackingNumber > 0 then
                                overview[iface]["tracking"] = #trackingNumber
                                overview[iface]["reliability"] = false
-                               local reliabilityNumber = tonumber(uci:get("mwan3", iface, "reliability"))
+                               local reliabilityNumber = tonumber(uci:get("mwan3", iface, "reliability") or "1")
                                if reliabilityNumber and reliabilityNumber <= #trackingNumber then
                                        overview[iface]["reliability"] = true
                                end