mirror of
https://github.com/wekan/wekan.git
synced 2025-04-24 14:08:31 -04:00
Bug: orphan documents were created when cards were deleted
This commit is contained in:
parent
29fdfb9c88
commit
06699007c4
1 changed files with 10 additions and 0 deletions
|
@ -354,9 +354,19 @@ if (Meteor.isServer) {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Remove all activities associated with a card if we remove the card
|
// Remove all activities associated with a card if we remove the card
|
||||||
|
// Remove also card_comments / checklists / attachments
|
||||||
Cards.after.remove((userId, doc) => {
|
Cards.after.remove((userId, doc) => {
|
||||||
Activities.remove({
|
Activities.remove({
|
||||||
cardId: doc._id,
|
cardId: doc._id,
|
||||||
});
|
});
|
||||||
|
Checklists.remove({
|
||||||
|
cardId: doc._id,
|
||||||
|
});
|
||||||
|
CardComments.remove({
|
||||||
|
cardId: doc._id,
|
||||||
|
});
|
||||||
|
Attachments.remove({
|
||||||
|
cardId: doc._id,
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue