1
0
Fork 0
mirror of synced 2024-09-09 22:16:26 +12:00
This commit is contained in:
Adria Navarro 2024-06-07 10:54:26 +02:00
parent f4e14db22a
commit b86501e25e

View file

@ -25,6 +25,7 @@ import {
outputProcessing, outputProcessing,
} from "../../../utilities/rowProcessor" } from "../../../utilities/rowProcessor"
import { cloneDeep } from "lodash" import { cloneDeep } from "lodash"
import { generateIdForRow } from "./utils"
export async function handleRequest<T extends Operation>( export async function handleRequest<T extends Operation>(
operation: T, operation: T,
@ -59,7 +60,9 @@ export async function patch(ctx: UserCtx<PatchRowRequest, PatchRowResponse>) {
id: breakRowIdField(_id), id: breakRowIdField(_id),
row: dataToUpdate, row: dataToUpdate,
}) })
const row = await sdk.rows.external.getRow(tableId, _id, {
const updatedId = generateIdForRow(dataToUpdate, table)
const row = await sdk.rows.external.getRow(tableId, updatedId, {
relationships: true, relationships: true,
}) })
const enrichedRow = await outputProcessing(table, row, { const enrichedRow = await outputProcessing(table, row, {