Try to fix Attachments.insert is not a function.

Thanks to ChrisMagnuson and xet7 !

Fixes #4432
This commit is contained in:
Lauri Ojansivu 2022-04-02 16:38:15 +03:00
parent dd89afff4d
commit 02e977f512

View file

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