Skip to content

Commit

Permalink
addressed comments and retested
Browse files Browse the repository at this point in the history
  • Loading branch information
borkarsaish65 committed Nov 26, 2024
1 parent 01707fd commit 4dfcfa2
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const url = mongoUrl.split(dbName)[0];
const observationDocuments = await db
.collection("observations")
.find({ referenceFrom: "project" })
.project({ "_id": 1,"project":1})
.toArray();

if (!observationDocuments.length) {
Expand All @@ -50,6 +51,7 @@ const url = mongoUrl.split(dbName)[0];
const projectRecords = await db
.collection("projects")
.find({ _id: { $in: projectIds } })
.project({"_id":1,"userRoleInformation":1,"userProfile":1})
.toArray();

for (const project of projectRecords) {
Expand All @@ -74,7 +76,7 @@ const url = mongoUrl.split(dbName)[0];
project.userProfile &&
project.userProfile.id
) {
setObject.userProfileInformation = project.userProfile;
setObject.userProfile = project.userProfile;
}


Expand Down

0 comments on commit 4dfcfa2

Please sign in to comment.