Skip to content

Commit e341918

Browse files
add forgotten await in async method
1 parent 736f8b7 commit e341918

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/services/ChallengeService.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -764,13 +764,13 @@ async function update (currentUser, challengeId, data, userToken, isFull) {
764764
if (_.isUndefined(_.get(challenge, 'legacy.directProjectId'))) {
765765
throw new errors.BadRequestError('You cannot activate the challenge as it has not been created on legacy yet. Please try again later or contact support.')
766766
}
767-
billingAccountId = helper.getProjectBillingAccount(_.get(challenge, 'legacy.directProjectId'))
767+
billingAccountId = await helper.getProjectBillingAccount(_.get(challenge, 'legacy.directProjectId'))
768768
}
769769
if (data.status === constants.challengeStatuses.Completed) {
770770
if (challenge.status !== constants.challengeStatuses.Active) {
771771
throw new errors.BadRequestError('You cannot mark a Draft challenge as Completed')
772772
}
773-
billingAccountId = helper.getProjectBillingAccount(_.get(challenge, 'legacy.directProjectId'))
773+
billingAccountId = await helper.getProjectBillingAccount(_.get(challenge, 'legacy.directProjectId'))
774774
}
775775
}
776776

0 commit comments

Comments
 (0)