mirror of
https://github.com/wekan/wekan.git
synced 2026-01-06 01:28:49 +01:00
Move every Activities.find(idOrFirstObjectSelector, options) to the ReactiveCache (directory models/)
This commit is contained in:
parent
ea72ce1fa2
commit
fef6433b75
6 changed files with 10 additions and 10 deletions
|
|
@ -170,7 +170,7 @@ Checklists.mutations({
|
|||
*/
|
||||
move(newCardId) {
|
||||
// update every activity
|
||||
Activities.find(
|
||||
ReactiveCache.getActivities(
|
||||
{checklistId: this._id}
|
||||
).forEach(activity => {
|
||||
Activities.update(activity._id, {
|
||||
|
|
@ -219,7 +219,7 @@ if (Meteor.isServer) {
|
|||
});
|
||||
|
||||
Checklists.before.remove((userId, doc) => {
|
||||
const activities = Activities.find({ checklistId: doc._id });
|
||||
const activities = ReactiveCache.getActivities({ checklistId: doc._id });
|
||||
const card = ReactiveCache.getCard(doc.cardId);
|
||||
if (activities) {
|
||||
activities.forEach(activity => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue