Skip to content

Commit

Permalink
Switch how we save the challenge
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgasper committed Apr 30, 2024
1 parent 96d2774 commit 36359c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/ChallengeEditor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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
Expand Down

0 comments on commit 36359c4

Please sign in to comment.