From 18c88ac101b72d73aacc4b83c43313c942b35f31 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 15 Oct 2021 14:31:45 +0100 Subject: [PATCH 1/2] Remove linkRows processing when importing CSVs --- packages/server/src/api/controllers/table/utils.js | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/packages/server/src/api/controllers/table/utils.js b/packages/server/src/api/controllers/table/utils.js index d263002da6..8ca14228f1 100644 --- a/packages/server/src/api/controllers/table/utils.js +++ b/packages/server/src/api/controllers/table/utils.js @@ -93,19 +93,10 @@ exports.handleDataImport = async (appId, user, table, dataImport) => { } } - // make sure link rows are up to date - finalData.push( - linkRows.updateLinks({ - appId, - eventType: linkRows.EventType.ROW_SAVE, - row, - tableId: row.tableId, - table, - }) - ) + finalData.push(row) } - await db.bulkDocs(await Promise.all(finalData)) + await db.bulkDocs(finalData) let response = await db.put(table) table._rev = response._rev } From 4c1451178c85e93f1462f9e0ef831489ba988dfa Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 15 Oct 2021 14:57:01 +0100 Subject: [PATCH 2/2] Lint :sparkles: --- packages/server/src/api/controllers/table/utils.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/server/src/api/controllers/table/utils.js b/packages/server/src/api/controllers/table/utils.js index 8ca14228f1..c92fb10a9e 100644 --- a/packages/server/src/api/controllers/table/utils.js +++ b/packages/server/src/api/controllers/table/utils.js @@ -1,5 +1,4 @@ const CouchDB = require("../../../db") -const linkRows = require("../../../db/linkedRows") const csvParser = require("../../../utilities/csvParser") const { getRowParams,