瀏覽代碼

Try to fix Attachments.insert is not a function.

Thanks to ChrisMagnuson and xet7 !

Fixes #4432
Lauri Ojansivu 3 年之前
父節點
當前提交
02e977f512
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      models/cards.js

+ 1 - 1
models/cards.js

@@ -585,8 +585,8 @@ Cards.helpers({
     // Copy attachments
     // Copy attachments
     oldCard.attachments().forEach(att => {
     oldCard.attachments().forEach(att => {
       att.cardId = _id;
       att.cardId = _id;
+      Attachments.insert(att);
       delete att._id;
       delete att._id;
-      return Attachments.insert(att);
     });
     });
 
 
     // copy checklists
     // copy checklists