mirror of
https://github.com/wekan/wekan.git
synced 2025-12-18 00:10:13 +01: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(orgWebsite, String);
|
||||||
check(orgIsActive, Boolean);
|
check(orgIsActive, Boolean);
|
||||||
|
|
||||||
const nOrgNames = Org.find({ orgShortName }).count();
|
const nOrgNames = ReactiveCache.getOrgs({ orgShortName }).length;
|
||||||
if (nOrgNames > 0) {
|
if (nOrgNames > 0) {
|
||||||
throw new Meteor.Error('orgname-already-taken');
|
throw new Meteor.Error('orgname-already-taken');
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -152,7 +152,7 @@ if (Meteor.isServer) {
|
||||||
check(orgWebsite, String);
|
check(orgWebsite, String);
|
||||||
check(orgIsActive, Boolean);
|
check(orgIsActive, Boolean);
|
||||||
|
|
||||||
const nOrgNames = Org.find({ orgShortName }).count();
|
const nOrgNames = ReactiveCache.getOrgs({ orgShortName }).length;
|
||||||
if (nOrgNames > 0) {
|
if (nOrgNames > 0) {
|
||||||
throw new Meteor.Error('orgname-already-taken');
|
throw new Meteor.Error('orgname-already-taken');
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue