mirror of
https://github.com/wekan/wekan.git
synced 2026-01-06 01:28:49 +01:00
Move every Team.find(idOrFirstObjectSelector, options) to the ReactiveCache (directory client/)
This commit is contained in:
parent
f2d52b55c8
commit
67c6dd7bee
2 changed files with 12 additions and 9 deletions
|
|
@ -382,11 +382,11 @@ Template.membersWidget.helpers({
|
|||
},
|
||||
|
||||
AtLeastOneTeamWasCreated(){
|
||||
let teams = Team.find({}, {sort: { createdAt: -1 }});
|
||||
let teams = ReactiveCache.getTeams({}, {sort: { createdAt: -1 }});
|
||||
if(teams === undefined)
|
||||
return false;
|
||||
|
||||
return teams.count() > 0;
|
||||
return teams.length > 0;
|
||||
},
|
||||
});
|
||||
|
||||
|
|
@ -1753,8 +1753,8 @@ BlazeComponent.extendComponent({
|
|||
|
||||
Template.addBoardTeamPopup.helpers({
|
||||
teamsDatas() {
|
||||
let teams = Team.find({}, {sort: { teamDisplayName: 1 }});
|
||||
return teams;
|
||||
let ret = ReactiveCache.getTeams({}, {sort: { teamDisplayName: 1 }});
|
||||
return ret;
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue