diff --git a/.circleci/config.yml b/.circleci/config.yml index 990cc8d7..f01686dc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -90,7 +90,7 @@ workflows: branches: only: - dev - - feature/phase-advance + - PLAT-3368 - "build-qa": context: org-global diff --git a/src/common/challenge-helper.js b/src/common/challenge-helper.js index 1c509398..5fc956fc 100644 --- a/src/common/challenge-helper.js +++ b/src/common/challenge-helper.js @@ -101,7 +101,7 @@ class ChallengeHelper { await helper.ensureAccessibleByGroupsAccess(currentUser, challenge); if (challenge.constraints) { - await this.validateChallengeConstraints(challenge.constraints); + await ChallengeHelper.validateChallengeConstraints(challenge.constraints); } } @@ -202,17 +202,17 @@ class ChallengeHelper { } if (data.constraints) { - await this.validateChallengeConstraints(data.constraints); + await ChallengeHelper.validateChallengeConstraints(data.constraints); } } - async validateChallengeConstraints(constraints) { + static async validateChallengeConstraints(constraints) { if (!_.isEmpty(constraints.allowedRegistrants)) { - await this.validateAllowedRegistrants(constraints.allowedRegistrants); + await ChallengeHelper.validateAllowedRegistrants(constraints.allowedRegistrants); } } - async validateAllowedRegistrants(allowedRegistrants) { + static async validateAllowedRegistrants(allowedRegistrants) { const members = await helper.getMembersByHandles(allowedRegistrants); const incorrectHandles = _.difference( allowedRegistrants,