From dc88fe607a5466a2582e120ae7f51247ec8a64c8 Mon Sep 17 00:00:00 2001 From: Alvaro Vega Date: Thu, 13 Jun 2024 11:10:18 +0200 Subject: [PATCH 1/3] provide service and subservice when update rule in mongo using findOneAndUpdate --- lib/models/rulesStore.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/models/rulesStore.js b/lib/models/rulesStore.js index 8d01fd96..2926f2b9 100644 --- a/lib/models/rulesStore.js +++ b/lib/models/rulesStore.js @@ -190,7 +190,11 @@ module.exports = { db.collection.bind(db, rulesCollectionName, { strict: true }), function(col, cb) { col.findOneAndUpdate( - { name: id }, + { + name: id, + service: r.service, + subservice: r.subservice + }, { $set: r }, { upsert: false, From 150a46d4232c053a17cddb6f090f623b0a248681 Mon Sep 17 00:00:00 2001 From: Alvaro Vega Date: Thu, 13 Jun 2024 11:21:13 +0200 Subject: [PATCH 2/3] update CNR --- Changelog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Changelog b/Changelog index 81d41afb..82b11c67 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,5 @@ +Fix: upgrade rule in mongo using service and subservice to avoid match with other rule + 1.31.0 (June 11th, 2024) - Fix: release transport resources of nodemailer after send email From 5e3f0c3126ec4208e65909cf2e3981ea108eb518 Mon Sep 17 00:00:00 2001 From: Alvaro Vega Date: Thu, 13 Jun 2024 11:25:33 +0200 Subject: [PATCH 3/3] update CNR --- Changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 82b11c67..29945c00 100644 --- a/Changelog +++ b/Changelog @@ -1,4 +1,4 @@ -Fix: upgrade rule in mongo using service and subservice to avoid match with other rule +Fix: upgrade rule in mongo using service and subservice to avoid match with other rule (#783) 1.31.0 (June 11th, 2024)