Open
Description
Link to reproduction
No response
Describe the Bug
There is a problem when I try to save two translations, only one is saved. Are there any options to avoid this?
async function updateProductLocale(id, locale, data) {
const url = '${process.env.PAYLOAD_API}/products/${id}?locale=${locale}'
const res = await axios.patch(
url,
data,
{
headers: {
Authorization: `API-Key ${process.env.PAYLOAD_SECRET}`,
'Content-Type': 'application/json',
},
}
)
return res.data
}
await updateProductLocale(existingProduct.id, 'uk', {
title: storyUk.name || '',
body: bodyUk.length ? bodyUk : [],
})
await updateProductLocale(existingProduct.id, 'ru', {
title: storyRu?.name || '',
body: bodyRu.length ? bodyRu : [],
})
`
To Reproduce
I need to automatically transfer data from an existing CMS to Payload using a script. At this stage, I cannot simultaneously update translations for a page in two languages at once.
Payload Version
3.43.0
Adapters and Plugins
No response