mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
Move every Lists.findOne() to the ReactiveCache
This commit is contained in:
parent
06e26d8d89
commit
0926943670
9 changed files with 17 additions and 16 deletions
|
@ -15,7 +15,7 @@ Meteor.methods({
|
|||
if (!watchableObj) throw new Meteor.Error('error-board-doesNotExist');
|
||||
board = watchableObj;
|
||||
} else if (watchableType === 'list') {
|
||||
watchableObj = Lists.findOne(id);
|
||||
watchableObj = ReactiveCache.getList(id);
|
||||
if (!watchableObj) throw new Meteor.Error('error-list-doesNotExist');
|
||||
board = watchableObj.board();
|
||||
} else if (watchableType === 'card') {
|
||||
|
|
|
@ -37,7 +37,7 @@ RulesHelper = {
|
|||
// in any [*] board
|
||||
let value = activity[field];
|
||||
if (field === 'oldListName') {
|
||||
const oldList = Lists.findOne({ _id: activity.oldListId });
|
||||
const oldList = ReactiveCache.getList(activity.oldListId);
|
||||
if (oldList) {
|
||||
value = oldList.title;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue