Skip to content

Commit

Permalink
Fix affiliations in the public visit query.
Browse files Browse the repository at this point in the history
  • Loading branch information
robol committed Oct 27, 2023
1 parent 9e80085 commit 54db9af
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions server/controllers/public/visits.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ async function visitsQuery(req) {
...personRoomAssignmentPipeline(),
{$lookup: {
from: 'institutions',
localField: 'affiliations',
localField: 'person.affiliations',
foreignField: '_id',
as: 'affiliations',
as: 'person.affiliations',
pipeline: [
{$project: {
_id: 0,
_id: 1,
name: 1,
code: 1,
city: 1,
Expand All @@ -41,6 +41,9 @@ async function visitsQuery(req) {
person: {
firstName: 1,
lastName: 1,
affiliations: {
name: 1
}
},
roomAssignment: {
room: {
Expand Down

0 comments on commit 54db9af

Please sign in to comment.