From 02e977f5128c76b6ff592c8b236868baaa9404cb Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Sat, 2 Apr 2022 16:38:15 +0300 Subject: [PATCH] Try to fix Attachments.insert is not a function. Thanks to ChrisMagnuson and xet7 ! Fixes #4432 --- models/cards.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/cards.js b/models/cards.js index ddc9aa72a..166bbf0cb 100644 --- a/models/cards.js +++ b/models/cards.js @@ -585,8 +585,8 @@ Cards.helpers({ // Copy attachments oldCard.attachments().forEach(att => { att.cardId = _id; + Attachments.insert(att); delete att._id; - return Attachments.insert(att); }); // copy checklists