From f59255e6846828f7cc6c073aefe9ae0b26537cb3 Mon Sep 17 00:00:00 2001 From: Matthieu Date: Thu, 30 Oct 2025 11:34:58 +0100 Subject: [PATCH] fix: de-duplicate constructeur ids before machine update --- app/pages/machine/[id].vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/pages/machine/[id].vue b/app/pages/machine/[id].vue index 4fdb4c8..e656323 100644 --- a/app/pages/machine/[id].vue +++ b/app/pages/machine/[id].vue @@ -3010,10 +3010,13 @@ const updateMachineInfo = async () => { if (!machine.value) return try { + const constructeurIds = uniqueConstructeurIds(machineConstructeurIds.value) + machineConstructeurIds.value = constructeurIds + const result = await updateMachineApi(machine.value.id, { name: machineName.value, reference: machineReference.value, - constructeurIds: machineConstructeurIds.value + constructeurIds, }) if (result.success) { const machinePayload = result.data?.machine && typeof result.data.machine === 'object'