Skip to content

Commit

Permalink
Sosynpl[premieroctet#110] fixed askRecommandation so it skips validation
Browse files Browse the repository at this point in the history
  • Loading branch information
SeghirOumo committed Jul 26, 2024
1 parent 0118dfc commit 2e8e51b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions backend/web/server/plugins/sosynpl/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ const preProcessGet = async ({ model, fields, id, user, params }) => {

setPreprocessGet(preProcessGet)

const preCreate = async ({model, params, user}) => {
const preCreate = async ({model, params, user, skip_validation}) => {
if (['experience', 'communication', 'certification', 'training'].includes(model) && !params.user) {
params.user=user
}
Expand Down Expand Up @@ -673,7 +673,10 @@ const preCreate = async ({model, params, user}) => {
params.conversation=conversation
params.receiver=await conversation.getPartner(user)
}
return Promise.resolve({model, params})
if (model == 'recommandation') {
skip_validation=true
}
return Promise.resolve({model, params, user, skip_validation})
}

setPreCreateData(preCreate)
Expand Down

0 comments on commit 2e8e51b

Please sign in to comment.