From 56f448bfe5b1a15cf607dcb4cf7cf32f6d343868 Mon Sep 17 00:00:00 2001 From: Peace Date: Wed, 31 May 2023 21:29:20 +0200 Subject: [PATCH] fix: maintenance heredity --- server/model/monitor.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/model/monitor.js b/server/model/monitor.js index 5bcb2b103..2dfe2e65f 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -1371,11 +1371,11 @@ class Monitor extends BeanModel { if (maintenance && await maintenance.isUnderMaintenance()) { return true; } + } - const parent = await Monitor.getParent(monitorID); - if (parent != null) { - return await Monitor.isUnderMaintenance(parent.id); - } + const parent = await Monitor.getParent(monitorID); + if (parent != null) { + return await Monitor.isUnderMaintenance(parent.id); } return false;