fixup! Ref: original & and use fileObj.meta

This commit is contained in:
David Arnold 2020-09-16 18:19:56 -05:00
parent 8acc6d0532
commit b24970bc3d
No known key found for this signature in database
GPG key ID: 6D6A936E69C59D08
2 changed files with 3 additions and 3 deletions

View file

@ -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 } },
);
}

View file

@ -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;