summaryrefslogtreecommitdiffstats
path: root/models/cards.js
diff options
context:
space:
mode:
Diffstat (limited to 'models/cards.js')
-rw-r--r--models/cards.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/models/cards.js b/models/cards.js
index 9c149e51..922fbecd 100644
--- a/models/cards.js
+++ b/models/cards.js
@@ -354,9 +354,19 @@ 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) => {
Activities.remove({
cardId: doc._id,
});
+ Checklists.remove({
+ cardId: doc._id,
+ });
+ CardComments.remove({
+ cardId: doc._id,
+ });
+ Attachments.remove({
+ cardId: doc._id,
+ });
});
}