This commit is contained in:
Adria Navarro 2024-06-07 11:11:32 +02:00
parent 6b88622b50
commit b22ea1b0f9
1 changed files with 2 additions and 1 deletions

View File

@ -61,7 +61,8 @@ export async function patch(ctx: UserCtx<PatchRowRequest, PatchRowResponse>) {
row: dataToUpdate,
})
const updatedId = generateIdForRow(dataToUpdate, table)
// The id might have been changed, so the refetching would fail. Recalculating the id just in case
const updatedId = generateIdForRow({ _id, ...dataToUpdate }, table)
const row = await sdk.rows.external.getRow(tableId, updatedId, {
relationships: true,
})