Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch how we save the challenge (PS-263) #1588

Merged
merged 1 commit into from
May 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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