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

EDX-3045: Bug fix #2140

Merged
merged 2 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
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
7 changes: 2 additions & 5 deletions backend/src/components/sdc/sdc.js
Original file line number Diff line number Diff line change
Expand Up @@ -682,11 +682,8 @@ async function updateAndValidateSdcSchoolCollectionStudent(req, res) {
status: HttpStatus.CONFLICT,
message: 'The student you are attempting to update is already being saved by another user. Please refresh your screen and try again.'
});
} else if (e.status === 400 && e.data.message === 'SdcSchoolCollectionStudent was not saved to the database because it would create a provincial duplicate.') {
return res.status(HttpStatus.CONFLICT).json({
status: HttpStatus.CONFLICT,
message: 'Student was not saved because it would create provincial a duplicate.'
});
} else if (e?.status === 400) {
return res.status(HttpStatus.BAD_REQUEST).json(e?.data?.message);
}
return handleExceptionResponse(e, res);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ export default {
}
}).catch(error => {
console.error(error);
setFailureAlert(error?.response?.data?.message ? error?.response?.data?.message : 'An error occurred while trying to update student details. Please try again later.');
setFailureAlert(error?.response?.data ? error?.response?.data : 'An error occurred while trying to update student details. Please try again later.');
}).finally(() => {
this.loadingCount -= 1;
this.$emit('reset-parent');
Expand Down
Loading