From 577f88d729627434f1914f5b939421479409c94b Mon Sep 17 00:00:00 2001 From: SeghirOumo Date: Fri, 26 Jul 2024 15:22:18 +0200 Subject: [PATCH] Sosynpl[#153] fixed question creation not receiving announce ID from params.parent --- backend/web/server/plugins/sosynpl/functions.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/web/server/plugins/sosynpl/functions.js b/backend/web/server/plugins/sosynpl/functions.js index a30278300b..cc71ddb0f2 100644 --- a/backend/web/server/plugins/sosynpl/functions.js +++ b/backend/web/server/plugins/sosynpl/functions.js @@ -676,6 +676,10 @@ const preCreate = async ({model, params, user, skip_validation}) => { if (model == 'recommandation') { skip_validation=true } + if (model == 'question' ) { + skip_validation = true + params.announce = params.parent + } return Promise.resolve({model, params, user, skip_validation}) }