mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
FIX: Admin group search was failing
This commit is contained in:
parent
629bfb73f5
commit
b175abbfb5
1 changed files with 19 additions and 15 deletions
|
@ -37,6 +37,7 @@ function organizeResults(r, options) {
|
|||
groups = [],
|
||||
results = [];
|
||||
|
||||
if (r.users) {
|
||||
r.users.every(function(u) {
|
||||
if (exclude.indexOf(u.username) === -1) {
|
||||
users.push(u);
|
||||
|
@ -44,7 +45,9 @@ function organizeResults(r, options) {
|
|||
}
|
||||
return results.length <= limit;
|
||||
});
|
||||
}
|
||||
|
||||
if (r.groups) {
|
||||
r.groups.every(function(g) {
|
||||
if (results.length > limit) return false;
|
||||
if (exclude.indexOf(g.name) === -1) {
|
||||
|
@ -53,6 +56,7 @@ function organizeResults(r, options) {
|
|||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
results.users = users;
|
||||
results.groups = groups;
|
||||
|
|
Loading…
Reference in a new issue