From 94c8dfdb945c0b5a8d69ad2ff86b06662b1b95e5 Mon Sep 17 00:00:00 2001 From: Paul Gain Date: Sat, 9 Mar 2024 16:22:07 +0000 Subject: [PATCH] Fixes a bug that prevents the export win from being saved When converting an export project to an export win the transformer was incorrectly transforming the exporter_experience into an array when it should have been an object. This is problematic when the user gets to the end of the form and attempts to save, the API endpoint validation rejects the HTTP POST. --- src/client/modules/ExportWins/Form/transformers.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/client/modules/ExportWins/Form/transformers.js b/src/client/modules/ExportWins/Form/transformers.js index 5bfd99e05ff..641b21781a0 100644 --- a/src/client/modules/ExportWins/Form/transformers.js +++ b/src/client/modules/ExportWins/Form/transformers.js @@ -109,9 +109,7 @@ export const transformExportProjectForForm = (exportProject) => { // Customer details // The exporter experience field is optional when adding an Export Project ...(exportProject.exporter_experience && { - export_experience: [ - idNameToValueLabel(exportProject.exporter_experience), - ], + export_experience: idNameToValueLabel(exportProject.exporter_experience), }), company_contacts: exportProject.contacts.length === 1