diff options
Diffstat (limited to 'models/cards.js')
-rw-r--r-- | models/cards.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/models/cards.js b/models/cards.js index 1236de1a..ae52ff04 100644 --- a/models/cards.js +++ b/models/cards.js @@ -402,10 +402,14 @@ Cards.helpers({ const _id = Cards.insert(this); // Copy attachments - oldCard.attachments().forEach(att => { - att.meta.cardId = _id; - delete att._id; - return Attachments.insert(att); + oldCard.attachments().forEach((file) => { + Meteor.call('cloneAttachment', file, + { + meta: { + cardId: _id + } + } + ); }); // copy checklists |