From 7cc97834369627c4889021d174915ca1d8365082 Mon Sep 17 00:00:00 2001 From: Nelson Chan Date: Mon, 26 Jun 2023 13:21:51 +0800 Subject: [PATCH] Fix: Active needs to return bool instead of 0 --- server/model/monitor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/model/monitor.js b/server/model/monitor.js index 2dfe2e65f..017e6813f 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -155,7 +155,7 @@ class Monitor extends BeanModel { async isActive() { const parentActive = await Monitor.isParentActive(this.id); - return this.active && parentActive; + return (this.active === 1) && parentActive; } /**