fix: de-duplicate constructeur ids before machine update
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user