FIX: prevents everyone group to show as group option for polls (#8957)

This commit is contained in:
Joffrey JAFFEUX 2020-02-14 14:11:34 +01:00 committed by GitHub
parent ce588006e3
commit 2c7d32e783
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 3 deletions

View File

@ -87,9 +87,14 @@ export default Controller.extend({
@discourseComputed("site.groups") @discourseComputed("site.groups")
siteGroups(groups) { siteGroups(groups) {
return groups.map(g => { return groups
return { name: g.name, value: g.name }; .map(g => {
}); // prevents group "everyone" to be listed
if (g.id !== 0) {
return { name: g.name, value: g.name };
}
})
.filter(Boolean);
}, },
@discourseComputed("pollType", "regularPollType") @discourseComputed("pollType", "regularPollType")