From 46039484428bccbf13fbcc92f0a4c7786de9a1d4 Mon Sep 17 00:00:00 2001 From: Martin Filser Date: Thu, 10 Mar 2022 00:21:32 +0100 Subject: [PATCH] Global search didn't work because of wrong Attachment search --- server/publications/cards.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/publications/cards.js b/server/publications/cards.js index 456da3b67..ac20961f2 100644 --- a/server/publications/cards.js +++ b/server/publications/cards.js @@ -774,7 +774,7 @@ function findCards(sessionId, query) { Users.find({ _id: { $in: users } }, { fields: Users.safeFields }), Checklists.find({ cardId: { $in: cards.map(c => c._id) } }), ChecklistItems.find({ cardId: { $in: cards.map(c => c._id) } }), - Attachments.find({ cardId: { $in: cards.map(c => c._id) } }), + Attachments.find({ 'meta.cardId': { $in: cards.map(c => c._id) } }).cursor, CardComments.find({ cardId: { $in: cards.map(c => c._id) } }), SessionData.find({ userId, sessionId }), ];