mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Admin group search was failing
This commit is contained in:
@@ -37,22 +37,26 @@ function organizeResults(r, options) {
|
|||||||
groups = [],
|
groups = [],
|
||||||
results = [];
|
results = [];
|
||||||
|
|
||||||
r.users.every(function(u) {
|
if (r.users) {
|
||||||
if (exclude.indexOf(u.username) === -1) {
|
r.users.every(function(u) {
|
||||||
users.push(u);
|
if (exclude.indexOf(u.username) === -1) {
|
||||||
results.push(u);
|
users.push(u);
|
||||||
}
|
results.push(u);
|
||||||
return results.length <= limit;
|
}
|
||||||
});
|
return results.length <= limit;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
r.groups.every(function(g) {
|
if (r.groups) {
|
||||||
if (results.length > limit) return false;
|
r.groups.every(function(g) {
|
||||||
if (exclude.indexOf(g.name) === -1) {
|
if (results.length > limit) return false;
|
||||||
groups.push(g);
|
if (exclude.indexOf(g.name) === -1) {
|
||||||
results.push(g);
|
groups.push(g);
|
||||||
}
|
results.push(g);
|
||||||
return true;
|
}
|
||||||
});
|
return true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
results.users = users;
|
results.users = users;
|
||||||
results.groups = groups;
|
results.groups = groups;
|
||||||
|
|||||||
Reference in New Issue
Block a user