mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-09 04:40:56 +08:00
Added fix to remove children when type changed
This commit is contained in:
@@ -1463,6 +1463,17 @@ class Monitor extends BeanModel {
|
||||
return childrenIDs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unlinks all children of the the group monitor
|
||||
* @param {number} groupID ID of group to remove children of
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
static async unlinkAllChildren(groupID) {
|
||||
return await R.exec("UPDATE `monitor` SET parent = ? WHERE parent = ? ", [
|
||||
null, groupID
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks recursive if parent (ancestors) are active
|
||||
* @param {number} monitorID ID of the monitor to get
|
||||
|
Reference in New Issue
Block a user