From aa738659aea8b8043a3dd834072448446b261f19 Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Thu, 26 Sep 2024 16:21:34 +0100 Subject: [PATCH] Respond to PR feedback. --- .../src/api/controllers/row/utils/basic.ts | 30 +++++++++---------- packages/server/src/sdk/app/rows/internal.ts | 1 - 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/packages/server/src/api/controllers/row/utils/basic.ts b/packages/server/src/api/controllers/row/utils/basic.ts index 23565670ba..a7aa82e1f2 100644 --- a/packages/server/src/api/controllers/row/utils/basic.ts +++ b/packages/server/src/api/controllers/row/utils/basic.ts @@ -134,22 +134,20 @@ export async function basicProcessing({ } let columns: string[] = Object.keys(table.schema) - if (!isCalculationView) { - if (!sqs) { - thisRow._id = generateIdForRow(row, table, isLinked) - thisRow.tableId = table._id - thisRow._rev = "rev" - columns = columns.concat(PROTECTED_EXTERNAL_COLUMNS) - } else { - columns = columns.concat(PROTECTED_EXTERNAL_COLUMNS) - for (let internalColumn of [...PROTECTED_INTERNAL_COLUMNS, ...columns]) { - thisRow[internalColumn] = extractFieldValue({ - row, - tableName: table._id!, - fieldName: internalColumn, - isLinked, - }) - } + if (!sqs && !isCalculationView) { + thisRow._id = generateIdForRow(row, table, isLinked) + thisRow.tableId = table._id + thisRow._rev = "rev" + columns = columns.concat(PROTECTED_EXTERNAL_COLUMNS) + } else if (!isCalculationView) { + columns = columns.concat(PROTECTED_EXTERNAL_COLUMNS) + for (let internalColumn of [...PROTECTED_INTERNAL_COLUMNS, ...columns]) { + thisRow[internalColumn] = extractFieldValue({ + row, + tableName: table._id!, + fieldName: internalColumn, + isLinked, + }) } } for (let col of columns) { diff --git a/packages/server/src/sdk/app/rows/internal.ts b/packages/server/src/sdk/app/rows/internal.ts index 997af3c907..9306609132 100644 --- a/packages/server/src/sdk/app/rows/internal.ts +++ b/packages/server/src/sdk/app/rows/internal.ts @@ -1,7 +1,6 @@ import { context, db } from "@budibase/backend-core" import { Row, Table, ViewV2 } from "@budibase/types" import sdk from "../../../sdk" -import cloneDeep from "lodash/fp/cloneDeep" import { finaliseRow } from "../../../api/controllers/row/staticFormula" import { inputProcessing,