diff --git a/api/app/lib/utils/dataRange.js b/api/app/lib/utils/dataRange.js index 802e18f..02eb797 100644 --- a/api/app/lib/utils/dataRange.js +++ b/api/app/lib/utils/dataRange.js @@ -39,8 +39,12 @@ module.exports = function (app, opts) { const bindRes = await models.ProjectCorrelation.findAll(findOption) // 获取不重复的 安心云项目id - let pepProjectIds = bindRes.map(b => b.pepProjectId) - + let pepProjectIds = [] + for (let b of bindRes) { + if (b.pepProjectId) { + pepProjectIds.push(b.pepProjectId) + } + } // 查询项企项目的信息 let pepProjectWhereOptions = [] if (keywordTarget == 'pepProject' && keyword) {