We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9886d33 commit f5b5a21Copy full SHA for f5b5a21
src/services/ChallengeService.js
@@ -29,6 +29,7 @@ async function filterChallengesByGroupsAccess (currentUser, challenges) {
29
const needToCheckForGroupAccess = !currentUser ? true : !currentUser.isMachine && !helper.hasAdminRole(currentUser)
30
console.log('needToCheckForGroupAccess', needToCheckForGroupAccess)
31
for (const challenge of challenges) {
32
+ challenge.groups = _.filter(challenge.groups, g => _.toString(g).toLowerCase() !== 'null')
33
console.log('challenge.groups', challenge.groups)
34
if (!challenge.groups || _.get(challenge, 'groups.length', 0) === 0 || !needToCheckForGroupAccess) {
35
res.push(challenge)
0 commit comments