From 595b35fb15141ad739be893e75b61aae0fd53b59 Mon Sep 17 00:00:00 2001 From: Ionys <9364594+Ionys320@users.noreply.github.com> Date: Sat, 2 Nov 2024 13:09:23 +0100 Subject: [PATCH] fix(tags): Fix the tag deletion (#5298) --- server/model/monitor.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/model/monitor.js b/server/model/monitor.js index 9a30a6689..3ad8cfafc 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -1522,7 +1522,7 @@ class Monitor extends BeanModel { */ static async getMonitorTag(monitorIDs) { 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 JOIN tag ON monitor_tag.tag_id = tag.id WHERE monitor_tag.monitor_id IN (${monitorIDs.map((_) => "?").join(",")}) @@ -1567,6 +1567,8 @@ class Monitor extends BeanModel { } tagsMap.get(row.monitor_id).push({ tag_id: row.tag_id, + monitor_id: row.monitor_id, + value: row.value, name: row.name, color: row.color });