File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
packages/reva-api/modules/candidacy/features Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,13 @@ export const getReferentOrganismFromCandidacyId = async ({
9
9
try {
10
10
const candidacy = await prismaClient . candidacy . findUnique ( {
11
11
where : { id : candidacyId } ,
12
- include : { organism : true } ,
12
+ include : {
13
+ organism : {
14
+ include : {
15
+ organismInformationsCommerciales : true ,
16
+ } ,
17
+ } ,
18
+ } ,
13
19
} ) ;
14
20
15
21
if ( ! candidacy ) {
Original file line number Diff line number Diff line change @@ -58,11 +58,17 @@ export const submitCandidacy = async ({
58
58
`Impossible de trouver l'organisme pour la candidature ${ candidacy . id } ` ,
59
59
) ;
60
60
}
61
- await sendNewCandidacyEmail ( { email : organism . contactAdministrativeEmail } ) ;
61
+ await sendNewCandidacyEmail ( {
62
+ email :
63
+ organism . organismInformationsCommerciales ?. emailContact ??
64
+ organism . contactAdministrativeEmail ,
65
+ } ) ;
62
66
await sendConfirmationCandidacySubmissionEmail ( {
63
67
email : candidate . email as string ,
64
68
organismName : organism . label ,
65
- organismEmail : organism . contactAdministrativeEmail ,
69
+ organismEmail :
70
+ organism . organismInformationsCommerciales ?. emailContact ??
71
+ organism . contactAdministrativeEmail ,
66
72
candidacyFundedByFranceVae : candidacy . financeModule !== "hors_plateforme" ,
67
73
} ) ;
68
74
return updatedCandidacy ;
You can’t perform that action at this time.
0 commit comments