diff --git a/packages/server/src/api/controllers/row/external.ts b/packages/server/src/api/controllers/row/external.ts index 7d78f5da37..899849e3a7 100644 --- a/packages/server/src/api/controllers/row/external.ts +++ b/packages/server/src/api/controllers/row/external.ts @@ -72,10 +72,15 @@ export async function patch(ctx: UserCtx) { id: breakRowIdField(_id), row: dataToUpdate, }) - const row = await outputProcessing(table, response.row) + const row = await sdk.rows.external.getRow(tableId, _id, { + relationships: true, + }) + const enrichedRow = await outputProcessing(table, row, { + preserveLinks: true, + }) return { ...response, - row, + row: enrichedRow, table, } } @@ -116,7 +121,7 @@ export async function save(ctx: UserCtx) { }) return { ...response, - row: await outputProcessing(table, row), + row: await outputProcessing(table, row, { preserveLinks: true }), } } else { return response diff --git a/packages/server/src/sdk/app/rows/search/external.ts b/packages/server/src/sdk/app/rows/search/external.ts index 817bfce33d..f908be0b3c 100644 --- a/packages/server/src/sdk/app/rows/search/external.ts +++ b/packages/server/src/sdk/app/rows/search/external.ts @@ -77,7 +77,7 @@ export async function search(options: SearchParams) { } const table = await sdk.tables.getTable(tableId) - rows = await outputProcessing(table, rows) + rows = await outputProcessing(table, rows, { preserveLinks: true }) // need wrapper object for bookmarks etc when paginating return { rows, hasNextPage, bookmark: bookmark && bookmark + 1 } @@ -174,7 +174,7 @@ export async function fetch(tableId: string) { includeSqlRelationships: IncludeRelationship.INCLUDE, }) const table = await sdk.tables.getTable(tableId) - return await outputProcessing(table, response) + return await outputProcessing(table, response, { preserveLinks: true }) } export async function fetchView(viewName: string) {