if interface enable is a boolean, check it as a string

This commit is contained in:
liamcottle 2025-02-02 18:30:43 +13:00
commit 620c147dbd

View file

@ -143,11 +143,7 @@ class Utils {
static isInterfaceEnabled(iface) {
const rawValue = iface.enabled ?? iface.interface_enabled;
if (rawValue === true) {
// when enabled or interface_enabled is True it needs to return true.
return true;
}
const value = rawValue?.toLowerCase();
const value = rawValue?.toString().toLowerCase();
return value === "on" || value === "yes" || value === "true";
}