From 36359c400d946d4ca71f17682ab19b51c581cf3e Mon Sep 17 00:00:00 2001 From: Justin Gasper Date: Wed, 1 May 2024 08:25:16 +1000 Subject: [PATCH] Switch how we save the challenge --- src/components/ChallengeEditor/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ChallengeEditor/index.js b/src/components/ChallengeEditor/index.js index e0cf321f..0ce1ea9a 100644 --- a/src/components/ChallengeEditor/index.js +++ b/src/components/ChallengeEditor/index.js @@ -1224,7 +1224,6 @@ class ChallengeEditor extends Component { newChallenge.status = status try { const challengeId = this.getCurrentChallengeId() - const action = await updateChallengeDetails(challengeId, challenge, projectDetail.id) // state can have updated assigned member (in cases where user changes assignments without refreshing the page) const { challenge: { copilot, reviewer, type }, assignedMemberDetails: assignedMember } = this.state const oldMemberHandle = _.get(oldAssignedMember, 'handle') @@ -1245,6 +1244,7 @@ class ChallengeEditor extends Component { } else { if (reviewer !== previousReviewer) await this.updateResource(challengeId, 'Reviewer', reviewer, previousReviewer) } + const action = await updateChallengeDetails(challengeId, challenge, projectDetail.id) const draftChallenge = { data: action.challengeDetails } draftChallenge.data.copilot = copilot draftChallenge.data.reviewer = reviewer