Skip to content

Commit 2f970f2

Browse files
Merge pull request #78 from topcoder-platform/develop
push to prod
2 parents 8c68961 + ad79d52 commit 2f970f2

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/models/Challenge.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ const schema = new Schema({
1414
},
1515
legacyId: {
1616
type: Number,
17-
required: false,
18-
rangeKey: true,
19-
index: true
17+
required: false
2018
},
2119
typeId: {
2220
type: String,
@@ -122,8 +120,7 @@ const schema = new Schema({
122120
required: false
123121
}
124122
},
125-
{
126-
throughput: { read: 4, write: 2 }
127-
})
123+
{ throughput: 'ON_DEMAND' }
124+
)
128125

129126
module.exports = schema

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)