Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b680a80

Browse files
committedJan 27, 2023
fix: only allow Active, Draft challenges to be extended
1 parent 4005951 commit b680a80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/services/ChallengeService.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1524,7 +1524,7 @@ async function update (currentUser, challengeId, data, isFull) {
15241524
}
15251525
}
15261526

1527-
if (data.phases || data.startDate) {
1527+
if (challenge.status !== constants.challengeStatuses.Completed && (data.phases || data.startDate)) {
15281528
if (data.phases && data.phases.length > 0) {
15291529
for (let i = 0; i < challenge.phases.length; i += 1) {
15301530
const updatedPhaseInfo = _.find(data.phases, p => p.phaseId === challenge.phases[i].phaseId)

0 commit comments

Comments
 (0)
Please sign in to comment.