Skip to content

Commit 0c144a0

Browse files
authored
Merge pull request #653 from topcoder-platform/PLAT-3368
fix: challenge helper method [skip ci]
2 parents 37444ad + 2feb8b4 commit 0c144a0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ workflows:
9090
branches:
9191
only:
9292
- dev
93-
- feature/phase-advance
93+
- PLAT-3368
9494

9595
- "build-qa":
9696
context: org-global

src/common/challenge-helper.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class ChallengeHelper {
101101
await helper.ensureAccessibleByGroupsAccess(currentUser, challenge);
102102

103103
if (challenge.constraints) {
104-
await this.validateChallengeConstraints(challenge.constraints);
104+
await ChallengeHelper.validateChallengeConstraints(challenge.constraints);
105105
}
106106
}
107107

@@ -202,17 +202,17 @@ class ChallengeHelper {
202202
}
203203

204204
if (data.constraints) {
205-
await this.validateChallengeConstraints(data.constraints);
205+
await ChallengeHelper.validateChallengeConstraints(data.constraints);
206206
}
207207
}
208208

209-
async validateChallengeConstraints(constraints) {
209+
static async validateChallengeConstraints(constraints) {
210210
if (!_.isEmpty(constraints.allowedRegistrants)) {
211-
await this.validateAllowedRegistrants(constraints.allowedRegistrants);
211+
await ChallengeHelper.validateAllowedRegistrants(constraints.allowedRegistrants);
212212
}
213213
}
214214

215-
async validateAllowedRegistrants(allowedRegistrants) {
215+
static async validateAllowedRegistrants(allowedRegistrants) {
216216
const members = await helper.getMembersByHandles(allowedRegistrants);
217217
const incorrectHandles = _.difference(
218218
allowedRegistrants,

0 commit comments

Comments
 (0)