mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
🐛 Fixed table constraint error when updating member's email with an already existing email (#12178)
closes #12045 - When member's email is updated to an already existing email of different member it caused table's unique constraint error, which was not handled properly. - Added handling for this error similar to one in members `add` method.
This commit is contained in:
parent
8ea9896622
commit
574f2ca9c1
1 changed files with 3 additions and 1 deletions
|
@ -55,7 +55,9 @@ const doImport = async ({members, labels, importSetLabels, createdBy}) => {
|
|||
if (error.code === 'ER_DUP_ENTRY') {
|
||||
return new errors.ValidationError({
|
||||
message: i18n.t('errors.models.member.memberAlreadyExists.message'),
|
||||
context: i18n.t('errors.models.member.memberAlreadyExists.context'),
|
||||
context: i18n.t('errors.models.member.memberAlreadyExists.context', {
|
||||
action: 'add'
|
||||
}),
|
||||
err: error
|
||||
});
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue