fix(constructeurs) : always send constructeurs array in PATCH payload
This commit is contained in:
@@ -155,9 +155,7 @@ export const buildConstructeurRequestPayload = <T extends Record<string, any>>(
|
|||||||
delete next.constructeurs;
|
delete next.constructeurs;
|
||||||
delete next.constructeurIds;
|
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[] };
|
return next as T & { constructeurs?: string[] };
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user