Skip to content

Commit

Permalink
fix(lbac-2247): fix typage idcc (#1656)
Browse files Browse the repository at this point in the history
* fix(lbac-2247): fix typage idcc

* fix: typing
  • Loading branch information
remy-auricoste authored Nov 20, 2024
1 parent cba59b1 commit 897d231
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions server/src/services/etablissement.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ export const entrepriseOnboardingWorkflow = {
email: string
cfa_delegated_siret: string
opco?: OPCOS_LABEL
idcc?: string | null
idcc?: number | null
managedBy: string
origin: string
}) => {
Expand All @@ -779,7 +779,7 @@ export const entrepriseOnboardingWorkflow = {
const entreprise = await upsertEntrepriseData(siret, origin, siretResponse, isSiretInternalError)
let opcoResult: { opco: OPCOS_LABEL | null; idcc: number | null } | null = null
if (opco) {
opcoResult = await updateEntrepriseOpco(siret, { opco, idcc: parseInt(idcc ?? "") || null })
opcoResult = await updateEntrepriseOpco(siret, { opco, idcc: idcc ?? null })
}

const formulaireInfo = await createFormulaire(
Expand Down
2 changes: 1 addition & 1 deletion shared/routes/formulaire.route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const zFormulaireRoute = {
first_name: z.string(),
phone: z.string(),
opco: z.string().optional(),
idcc: z.string().nullish().optional(),
idcc: z.number().nullish().optional(),
})
.strict(),
response: {
Expand Down

0 comments on commit 897d231

Please sign in to comment.