diff --git a/api/app/lib/controllers/alarm/app.js b/api/app/lib/controllers/alarm/app.js index 497cca7..89fd936 100644 --- a/api/app/lib/controllers/alarm/app.js +++ b/api/app/lib/controllers/alarm/app.js @@ -249,16 +249,14 @@ async function apiErrorList (ctx) { ${pepProjectSql} WHERE project_name LIKE '%${keyword}%'` ).toPromise() - if (projectRes.length) { - findOption.where.$or.push( - { - '$app->projectCorrelations.pep_project_id$': { - $in: projectRes.map(p => p.id) - }, - '$app.name$': { $like: `%${keyword}%` } - } - ) - } + findOption.where.$or.push( + { + '$app->projectCorrelations.pep_project_id$': { + $in: projectRes.map(p => p.id) + }, + '$app.name$': { $like: `%${keyword}%` } + } + ) } // if (errType) {