mirror of
https://github.com/wekan/wekan.git
synced 2025-04-23 21:47:10 -04:00
Move every Team.find(idOrFirstObjectSelector, options) to the ReactiveCache (directory models/)
This commit is contained in:
parent
67c6dd7bee
commit
f3d58339ae
1 changed files with 2 additions and 2 deletions
|
@ -123,7 +123,7 @@ if (Meteor.isServer) {
|
|||
check(teamWebsite, String);
|
||||
check(teamIsActive, Boolean);
|
||||
|
||||
const nTeamNames = Team.find({ teamShortName }).count();
|
||||
const nTeamNames = ReactiveCache.getTeams({ teamShortName }).length;
|
||||
if (nTeamNames > 0) {
|
||||
throw new Meteor.Error('teamname-already-taken');
|
||||
} else {
|
||||
|
@ -149,7 +149,7 @@ if (Meteor.isServer) {
|
|||
check(teamShortName, String);
|
||||
check(teamWebsite, String);
|
||||
check(teamIsActive, Boolean);
|
||||
const nTeamNames = Team.find({ teamShortName }).count();
|
||||
const nTeamNames = ReactiveCache.getTeams({ teamShortName }).length;
|
||||
if (nTeamNames > 0) {
|
||||
throw new Meteor.Error('teamname-already-taken');
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue