Skip to content

Commit 0a2359e

Browse files
fix phases
1 parent d357ee5 commit 0a2359e

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
@@ -1414,7 +1414,7 @@ async function update (currentUser, challengeId, data, isFull) {
14141414
if (finalStatus !== constants.challengeStatuses.New && finalTimelineTemplateId !== challenge.timelineTemplateId) {
14151415
throw new errors.BadRequestError(`Cannot change the timelineTemplateId for challenges with status: ${finalStatus}`)
14161416
}
1417-
} else {
1417+
} else if (finalTimelineTemplateId !== challenge.timelineTemplateId) {
14181418
// make sure there are no previous phases if the timeline template has changed
14191419
challenge.phases = []
14201420
}

0 commit comments

Comments
 (0)