Skip to content

Commit eb7fad5

Browse files
remove cancelReason from the updateInput
1 parent b1a7007 commit eb7fad5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/services/ChallengeService.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1595,7 +1595,7 @@ async function updateChallenge(currentUser, challengeId, data) {
15951595
data.status === constants.challengeStatuses.CancelledPaymentFailed
15961596
) {
15971597
try {
1598-
await helper.cancelProject(challenge.projectId, cancelReason, currentUser);
1598+
await helper.cancelProject(challenge.projectId, data.cancelReason, currentUser);
15991599
} catch (e) {
16001600
logger.debug(`There was an error trying to cancel the project: ${e.message}`);
16011601
}
@@ -1874,8 +1874,7 @@ async function updateChallenge(currentUser, challengeId, data) {
18741874
}
18751875

18761876
try {
1877-
const updateInput = sanitizeRepeatedFieldsInUpdateRequest(data);
1878-
1877+
const updateInput = sanitizeRepeatedFieldsInUpdateRequest(_.omit(data, ['cancelReason']));
18791878
if (!_.isEmpty(updateInput)) {
18801879
const grpcMetadata = new GrpcMetadata();
18811880

0 commit comments

Comments
 (0)