mirror of
https://github.com/wekan/wekan.git
synced 2025-04-23 13:37:09 -04:00
Move every Org.find(idOrFirstObjectSelector, options) to the ReactiveCache (directory models/)
This commit is contained in:
parent
8c72531e6d
commit
f2d52b55c8
1 changed files with 2 additions and 2 deletions
|
@ -125,7 +125,7 @@ if (Meteor.isServer) {
|
|||
check(orgWebsite, String);
|
||||
check(orgIsActive, Boolean);
|
||||
|
||||
const nOrgNames = Org.find({ orgShortName }).count();
|
||||
const nOrgNames = ReactiveCache.getOrgs({ orgShortName }).length;
|
||||
if (nOrgNames > 0) {
|
||||
throw new Meteor.Error('orgname-already-taken');
|
||||
} else {
|
||||
|
@ -152,7 +152,7 @@ if (Meteor.isServer) {
|
|||
check(orgWebsite, String);
|
||||
check(orgIsActive, Boolean);
|
||||
|
||||
const nOrgNames = Org.find({ orgShortName }).count();
|
||||
const nOrgNames = ReactiveCache.getOrgs({ orgShortName }).length;
|
||||
if (nOrgNames > 0) {
|
||||
throw new Meteor.Error('orgname-already-taken');
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue