Fix validateParoles beforeUpdate
This commit is contained in:
@@ -136,10 +136,14 @@ module.exports = {
|
||||
},
|
||||
beforeUpdate: async event => {
|
||||
let {data} = event.params
|
||||
validateParoles(data.titre, data.transcription)
|
||||
|
||||
const {where} = event.params
|
||||
|
||||
const currentData = await strapi.db.query('api::parole.parole').findOne({
|
||||
where: {id: where.id}
|
||||
})
|
||||
|
||||
validateParoles(currentData.titre, currentData.transcription)
|
||||
|
||||
if(!data.publishedAt) {
|
||||
if (data.tit && !data.forceSlug) {
|
||||
const artiste = await jwennAwtisEpiId(data.artistes)
|
||||
|
||||
Reference in New Issue
Block a user