Skip to content

Commit

Permalink
fix: unable to submit pr time (#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
georgeciubotaru authored Jun 5, 2024
1 parent 826f873 commit 00e59aa
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/lib/server/mongo/collections/items.collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,19 @@ export class ItemsCollection extends BaseCollection<ItemSchema> {
as: 'submission'
}
},
{
$lookup: {
from: CollectionNames.CONTRIBUTORS,
localField: 'contributor_ids',
foreignField: 'id',
pipeline: [{ $match: { id: contributorId ? { $eq: contributorId } : { $ne: '' } } }],
as: 'contributor'
}
},
{
$set: {
submission: { $arrayElemAt: ['$submission', 0] }
submission: { $arrayElemAt: ['$submission', 0] },
contributor: { $arrayElemAt: ['$contributor', 0] }
}
}
])
Expand Down

0 comments on commit 00e59aa

Please sign in to comment.