This commit is contained in:
parent
53ff8784ff
commit
2beb1f65f0
|
@ -29,7 +29,7 @@ module.exports = Self => {
|
|||
where: {principalId: userId}
|
||||
});
|
||||
|
||||
const availableMailAlias = await models.MailAliasAcl.find({
|
||||
const availableMailAlias = await models.MailAliasAcl.findOne({
|
||||
fields: ['mailAliasFk'],
|
||||
include: {relation: 'mailAlias'},
|
||||
where: {
|
||||
|
@ -40,6 +40,6 @@ module.exports = Self => {
|
|||
}
|
||||
});
|
||||
|
||||
if (!availableMailAlias.length) throw new UserError('The alias cant be modified');
|
||||
if (!availableMailAlias) throw new UserError('The alias cant be modified');
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue