Fix creating error
This commit is contained in:
@@ -189,8 +189,9 @@ module.exports = {
|
||||
const user = await jwennUserEpiId(data?.user?.id)
|
||||
const userAdmin = await jwennUserAdminEpiId(data?.createdBy)
|
||||
const superAdmin = await jwennSuperAdminEpiId(data?.createdBy)
|
||||
const traductionsId = data.traductions.id
|
||||
const traductionsId = data?.traductions?.id
|
||||
|
||||
if (traductionsId) {
|
||||
const result = await strapi.db.query('api::parole.parole').findOne({
|
||||
where: {
|
||||
traductions: {
|
||||
@@ -210,6 +211,7 @@ module.exports = {
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
if (user) {
|
||||
strapi.plugins['email'].services.email.send({
|
||||
|
||||
Reference in New Issue
Block a user