From d7bc0496d70db5bd33d95d64d851aab236d25492 Mon Sep 17 00:00:00 2001 From: SeghirOumo Date: Wed, 24 Jul 2024 09:44:54 +0200 Subject: [PATCH] Sosynpl[#150]: changed model checking to include user --- backend/web/server/plugins/sosynpl/functions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/web/server/plugins/sosynpl/functions.js b/backend/web/server/plugins/sosynpl/functions.js index afb2e8b4c6..104b255ed1 100644 --- a/backend/web/server/plugins/sosynpl/functions.js +++ b/backend/web/server/plugins/sosynpl/functions.js @@ -574,9 +574,9 @@ const preProcessGet = async ({ model, fields, id, user, params }) => { return Conversation.findById(id) .then(async(conv) => { if(!conv){ - const model = await getModel(id, ['mission','application','customerFreelance']) + const model = await getModel(id, ['mission','application','customerFreelance','user']) let customerId, freelanceId, applicationId, partnerId - if(model == 'customerFreelance') { + if(model == 'customerFreelance' || model == 'user') { partnerId = id } else if(model == 'mission') {