Skip to content

Commit

Permalink
EDX-3045: Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SodhiA1 committed Dec 5, 2024
1 parent 67d1825 commit ad8cbd5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
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

0 comments on commit ad8cbd5

Please sign in to comment.