Skip to content

Commit 584c904

Browse files
author
Aranyajit
committed
add checks for project id
1 parent 9fef4a6 commit 584c904

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/services/ChallengeService.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1633,8 +1633,9 @@ async function updateChallenge(currentUser, challengeId, data) {
16331633
}
16341634

16351635
if (
1636-
data.status === constants.challengeStatuses.CancelledRequirementsInfeasible ||
1637-
data.status === constants.challengeStatuses.CancelledPaymentFailed
1636+
(data.status === constants.challengeStatuses.CancelledRequirementsInfeasible ||
1637+
data.status === constants.challengeStatuses.CancelledPaymentFailed) &&
1638+
challengeHelper.isProjectIdRequired(challenge.timelineTemplateId)
16381639
) {
16391640
try {
16401641
await helper.cancelProject(challenge.projectId, data.cancelReason, currentUser);

0 commit comments

Comments
 (0)