Skip to content

Commit

Permalink
Merge pull request #6480 from uktrade/fix/hvc-optional-field
Browse files Browse the repository at this point in the history
Fixes a bug around the optional HVC field
  • Loading branch information
paulgain authored Feb 2, 2024
2 parents c94b061 + a39edae commit 0388e92
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 0388e92

Please sign in to comment.