diff --git a/Changelog b/Changelog index 81d41afb..29945c00 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,5 @@ +Fix: upgrade rule in mongo using service and subservice to avoid match with other rule (#783) + 1.31.0 (June 11th, 2024) - Fix: release transport resources of nodemailer after send email 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,