From a7e779639d3464b48a0254fba5e6be52fa159733 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 3 Dec 2021 10:31:09 +0000 Subject: [PATCH] Refactor. --- packages/server/src/api/controllers/view/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/server/src/api/controllers/view/index.js b/packages/server/src/api/controllers/view/index.js index 9a844fedff..e3232323bf 100644 --- a/packages/server/src/api/controllers/view/index.js +++ b/packages/server/src/api/controllers/view/index.js @@ -91,11 +91,11 @@ exports.exportView = async ctx => { const relationships = Object.entries(schema) .filter(entry => entry[1].type === FieldTypes.LINK) .map(entry => entry[0]) - rows.forEach(row => { - relationships.forEach(column => delete row[column]) - }) - // delete relationships from schema + // iterate relationship columns and remove from and row and schema relationships.forEach(column => { + rows.forEach(row => { + delete row[column] + }) delete schema[column] })