fix: maintenance heredity

This commit is contained in:
Peace 2023-05-31 21:29:20 +02:00
parent 2b46da0f47
commit 56f448bfe5
No known key found for this signature in database
GPG key ID: 0EF6B46E172B739F

View file

@ -1371,12 +1371,12 @@ 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);
}
}
return false;
}