0
0
mirror of https://github.com/louislam/uptime-kuma.git synced 2024-11-28 10:36:39 +01:00

fix(tags): Fix the tag deletion (#5298)

This commit is contained in:
Ionys 2024-11-02 13:09:23 +01:00 committed by GitHub
parent 0254e72177
commit 595b35fb15
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1522,7 +1522,7 @@ class Monitor extends BeanModel {
*/ */
static async getMonitorTag(monitorIDs) { static async getMonitorTag(monitorIDs) {
return await R.getAll(` return await R.getAll(`
SELECT monitor_tag.monitor_id, monitor_tag.tag_id, tag.name, tag.color SELECT monitor_tag.monitor_id, monitor_tag.tag_id, monitor_tag.value, tag.name, tag.color
FROM monitor_tag FROM monitor_tag
JOIN tag ON monitor_tag.tag_id = tag.id JOIN tag ON monitor_tag.tag_id = tag.id
WHERE monitor_tag.monitor_id IN (${monitorIDs.map((_) => "?").join(",")}) WHERE monitor_tag.monitor_id IN (${monitorIDs.map((_) => "?").join(",")})
@ -1567,6 +1567,8 @@ class Monitor extends BeanModel {
} }
tagsMap.get(row.monitor_id).push({ tagsMap.get(row.monitor_id).push({
tag_id: row.tag_id, tag_id: row.tag_id,
monitor_id: row.monitor_id,
value: row.value,
name: row.name, name: row.name,
color: row.color color: row.color
}); });