From b24970bc3da59173206ccfaadd84fa220e9bee5d Mon Sep 17 00:00:00 2001 From: David Arnold Date: Wed, 16 Sep 2020 18:19:56 -0500 Subject: [PATCH] fixup! Ref: original & and use fileObj.meta --- models/cards.js | 4 ++-- models/exporter.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/models/cards.js b/models/cards.js index 427e3fd4a..82a4b7327 100644 --- a/models/cards.js +++ b/models/cards.js @@ -524,12 +524,12 @@ Cards.helpers({ attachments() { if (this.isLinkedCard()) { return Attachments.find( - { cardId: this.linkedId }, + { 'meta.cardId': this.linkedId }, { sort: { uploadedAt: -1 } }, ); } else { return Attachments.find( - { cardId: this._id }, + { 'meta.cardId': this._id }, { sort: { uploadedAt: -1 } }, ); } diff --git a/models/exporter.js b/models/exporter.js index 1c07f3ce2..7acfbecc2 100644 --- a/models/exporter.js +++ b/models/exporter.js @@ -118,7 +118,7 @@ export class Exporter { readStream.pipe(tmpWriteable); }; const getBase64DataSync = Meteor.wrapAsync(getBase64Data); - result.attachments = Attachments.find(byBoard) + result.attachments = Attachments.find({ 'meta.boardId': this._boardId }) .fetch() .map(attachment => { let filebase64 = null;