Skip to content

Commit 68a7dfd

Browse files
committed
fix: phase update object
1 parent 06578d3 commit 68a7dfd

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/services/ChallengeService.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1494,6 +1494,7 @@ async function updateChallenge(currentUser, challengeId, data) {
14941494

14951495
// Remove fields from data that are not allowed to be updated and that match the existing challenge
14961496
data = sanitizeData(sanitizeChallenge(data), challenge);
1497+
console.debug('Sanitized Data:', data);
14971498

14981499
validateChallengeUpdateRequest(currentUser, challenge, data);
14991500

@@ -1738,7 +1739,6 @@ async function updateChallenge(currentUser, challengeId, data) {
17381739
}
17391740

17401741
data.phases = newPhases;
1741-
challenge.phases = newPhases;
17421742
data.startDate = newStartDate;
17431743
data.endDate = helper.calculateChallengeEndDate(challenge, data);
17441744
}
@@ -2188,8 +2188,6 @@ function sanitizeChallenge(challenge) {
21882188
_.pick(phase, [
21892189
"phaseId",
21902190
"duration",
2191-
"isOpen",
2192-
"actualEndDate",
21932191
"scheduledStartDate",
21942192
"constraints",
21952193
])

0 commit comments

Comments
 (0)