From 4b0501d1864e97eae5b91da025fb2584e1da5858 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Wed, 27 Sep 2023 15:47:19 +0100 Subject: [PATCH] fix bad merge --- .../DataTable/modals/CreateEditColumn.svelte | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte index cabbe6b9df..fc0965e274 100644 --- a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte @@ -170,6 +170,13 @@ $tables.selected.primaryDisplay == null || $tables.selected.primaryDisplay === editableColumn.name + const mapped = Object.entries(bbRefTypeMapping).find( + ([_, v]) => v.type === field.type && v.subtype === field.subtype + ) + if (mapped) { + editableColumn.type = mapped[0] + delete editableColumn.subtype + } // Here we are setting the relationship values based on the editableColumn // This part of the code is used when viewing an existing field hence the check // for the tableId @@ -182,13 +189,6 @@ relationshipPart1 = part1 relationshipPart2 = part2 } - - const mapped = Object.entries(bbRefTypeMapping).find( - ([_, v]) => v.type === field.type && v.subtype === field.subtype - ) - if (mapped) { - editableColumn.type = mapped[0] - delete editableColumn.subtype } } else if (!savingColumn) { let highestNumber = 0