summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorguillaume <guillaume.cassou@supinfo.com>2018-10-12 11:18:11 +0200
committerguillaume <guillaume.cassou@supinfo.com>2018-10-12 11:18:11 +0200
commit5c588b24240fb2fc996828e8478ac24a490971d8 (patch)
tree32a42bdaea10812d243f9f2a03ab0a8b0b33cd9a
parent23a35d9707f82391c74afbfbe47173815646e589 (diff)
downloadwekan-5c588b24240fb2fc996828e8478ac24a490971d8.tar.gz
wekan-5c588b24240fb2fc996828e8478ac24a490971d8.tar.bz2
wekan-5c588b24240fb2fc996828e8478ac24a490971d8.zip
patch for customFields when deleting them
-rw-r--r--models/customFields.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/models/customFields.js b/models/customFields.js
index 6c5fe7c4..38481d8c 100644
--- a/models/customFields.js
+++ b/models/customFields.js
@@ -71,6 +71,12 @@ if (Meteor.isServer) {
Activities.remove({
customFieldId: doc._id,
});
+
+ Cards.update(
+ {'boardId': doc.boardId, 'customFields._id': doc._id},
+ {$pull: {'customFields': {'_id': doc._id}}},
+ {multi: true}
+ );
});
}