From fb3b47e2bb9349e5bba74292e38f9e0073e19ff0 Mon Sep 17 00:00:00 2001 From: Martin Filser Date: Sun, 26 Feb 2023 11:25:17 +0100 Subject: [PATCH] Move every Attachments.find(idOrFirstObjectSelector, options) to the ReactiveCache (directory models/) --- models/cards.js | 1 - models/exporter.js | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/models/cards.js b/models/cards.js index 7be74ea7e..8cc5968e2 100644 --- a/models/cards.js +++ b/models/cards.js @@ -588,7 +588,6 @@ Cards.helpers({ // Copy attachments oldCard.attachments() - .map(att => att.get()) .forEach(att => { copyFile(att, _id, fileStoreStrategyFactory); }); diff --git a/models/exporter.js b/models/exporter.js index a1b911691..d434890ce 100644 --- a/models/exporter.js +++ b/models/exporter.js @@ -77,8 +77,7 @@ export class Exporter { const byBoardAndAttachment = this._attachmentId ? { boardId: this._boardId, _id: this._attachmentId } : byBoard; - result.attachments = Attachments.find(byBoardAndAttachment) - .fetch() + result.attachments = ReactiveCache.getAttachments(byBoardAndAttachment) .map((attachment) => { let filebase64 = null; filebase64 = getBase64DataSync(attachment);