From 8137f2692fe3e1d9f1c0a9b635ef15cdf36728f7 Mon Sep 17 00:00:00 2001 From: guillaume Date: Tue, 23 Apr 2019 18:00:09 +0200 Subject: remove feature --- models/cards.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'models/cards.js') diff --git a/models/cards.js b/models/cards.js index 7430ae52..d5a59377 100644 --- a/models/cards.js +++ b/models/cards.js @@ -1518,7 +1518,7 @@ function cardCreation(userId, doc) { } function cardRemover(userId, doc) { - Activities.remove({ + ChecklistItems.remove({ cardId: doc._id, }); Checklists.remove({ @@ -1583,7 +1583,7 @@ if (Meteor.isServer) { // Remove all activities associated with a card if we remove the card // Remove also card_comments / checklists / attachments - Cards.after.remove((userId, doc) => { + Cards.before.remove((userId, doc) => { cardRemover(userId, doc); }); } -- cgit v1.2.3-1-g7c22