fix(constructeurs) : always send constructeurs array in PATCH payload

This commit is contained in:
Matthieu
2026-03-23 13:52:39 +01:00
parent 8176635eb8
commit ac860d3165

View File

@@ -155,9 +155,7 @@ export const buildConstructeurRequestPayload = <T extends Record<string, any>>(
delete next.constructeurs;
delete next.constructeurIds;
if (ids.length) {
next.constructeurs = ids.map((id) => `/api/constructeurs/${id}`);
}
next.constructeurs = ids.map((id) => `/api/constructeurs/${id}`);
return next as T & { constructeurs?: string[] };
};