Skip to content

Commit

Permalink
Update populate
Browse files Browse the repository at this point in the history
  • Loading branch information
marklise committed Sep 12, 2023
1 parent 4c0fd54 commit fe1e866
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/helpers/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,15 @@ exports.runDataQuery = async function (modelType, role, query, fields, sortWarmU
}
},
// Populate Recent Activity PCP
(modelType !== 'RecentActivity') && {
(modelType !== 'Project') && {
'$lookup': {
'from': 'epic',
'localField': 'pcp',
'foreignField': '_id',
'as': 'pcp'
}
},
(modelType !== 'RecentActivity') && {
(modelType !== 'Project') && {
'$unwind': {
'path': '$pcp',
'preserveNullAndEmptyArrays': true
Expand Down

0 comments on commit fe1e866

Please sign in to comment.