diff --git a/api/app/lib/controllers/push/config.js b/api/app/lib/controllers/push/config.js index f915686..d4b299e 100644 --- a/api/app/lib/controllers/push/config.js +++ b/api/app/lib/controllers/push/config.js @@ -42,7 +42,7 @@ async function list (ctx) { findOption.where.alarmType = { $contains: [alarmType] } } if (state) { - if (state == 'enable') { + if (state == 'enable' || state == 'notYet' || state == 'takeEffect') { findOption.where.disable = false } else if (state == 'disable') { findOption.where.disable = true diff --git a/api/app/lib/utils/dataRange.js b/api/app/lib/utils/dataRange.js index 14fcc6b..407c80e 100644 --- a/api/app/lib/utils/dataRange.js +++ b/api/app/lib/utils/dataRange.js @@ -207,6 +207,16 @@ module.exports = function (app, opts) { let pomsProject = [] for (let b of bindRes) { + if ( + keywordTarget == 'pepProject' && keyword + && ( + !b.name && !( + b.pepProjectId && pepProjectRes.some(pp => pp.id == b.pepProjectId) + ) + ) + ) { + continue + } if (b.pepProjectId) { let corPepProject = pepProjectRes.find(pp => pp.id == b.pepProjectId) || {} pomsProject.push({