Skip to content

Commit

Permalink
Fixes an issue around the optional HVC field
Browse files Browse the repository at this point in the history
  • Loading branch information
paulgain committed Feb 2, 2024
1 parent c94b061 commit a39edae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/modules/ExportWins/Form/transformers.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export const transformFormValuesForAPI = (values) => ({
name_of_export: values.name_of_export,
sector: values.sector.value,
// Support given
hvc: values.hvc.value,
...(values.hvc && { hvc: values.hvc.value }), // optional field
type_of_support: values.type_of_support.map((support) => support.value),
associated_programme: values.associated_programme.map((c) => c.value),
is_personally_confirmed: values.is_personally_confirmed[0] === OPTION_YES,
Expand Down

0 comments on commit a39edae

Please sign in to comment.