Skip to content

Commit ad79d52

Browse files
committed
Merge branch 'develop' of https://github.com/topcoder-platform/challenge-api into develop
2 parents 17f78c5 + 5a6bd19 commit ad79d52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/services/ChallengeService.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ async function filterChallengesByGroupsAccess (currentUser, challenges) {
2929
const needToCheckForGroupAccess = !currentUser ? true : !currentUser.isMachine && !helper.hasAdminRole(currentUser)
3030
console.log('needToCheckForGroupAccess', needToCheckForGroupAccess)
3131
for (const challenge of challenges) {
32-
challenge.groups = _.filter(challenge.groups, g => _.toString(g).toLowerCase() !== 'null')
32+
challenge.groups = _.filter(challenge.groups, g => !_.includes(['null', 'undefined'], _.toString(g).toLowerCase()))
3333
console.log('challenge.groups', challenge.groups)
3434
if (!challenge.groups || _.get(challenge, 'groups.length', 0) === 0 || !needToCheckForGroupAccess) {
3535
res.push(challenge)

0 commit comments

Comments
 (0)