From 006db17bfc34fcc0b9881a51599da121daf7a705 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 5 Jul 2021 11:03:54 +0100 Subject: [PATCH] Quick fixes for UI, making sure relationships UI not displayed unless tables exist and fixing issue with through being sent up with one-to-many. --- .../CreateEditRelationship.svelte | 22 +++++++++++-------- .../[selectedDatasource]/index.svelte | 21 +++++++++--------- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/CreateEditRelationship/CreateEditRelationship.svelte b/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/CreateEditRelationship/CreateEditRelationship.svelte index e1546dd0b1..ab5580cd88 100644 --- a/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/CreateEditRelationship/CreateEditRelationship.svelte +++ b/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/CreateEditRelationship/CreateEditRelationship.svelte @@ -61,6 +61,10 @@ fromRelationship.relationshipType === RelationshipTypes.MANY_TO_MANY // main is simply used to know this is the side the user configured it from const id = uuid() + if (!manyToMany) { + delete fromRelationship.through + delete toRelationship.through + } let relateFrom = { ...fromRelationship, type: "link", @@ -154,21 +158,21 @@ bind:value={toRelationship.tableId} /> {:else if toTable}