From 827508816e12ea48ab923375905aee8da4e89ae9 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Thu, 25 Jan 2024 12:14:55 +0000 Subject: [PATCH] Fix for relationship save button being enabled when table was missing --- .../backend/Datasources/CreateEditRelationship.svelte | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/components/backend/Datasources/CreateEditRelationship.svelte b/packages/builder/src/components/backend/Datasources/CreateEditRelationship.svelte index c837247986..f9b688210a 100644 --- a/packages/builder/src/components/backend/Datasources/CreateEditRelationship.svelte +++ b/packages/builder/src/components/backend/Datasources/CreateEditRelationship.svelte @@ -88,8 +88,12 @@ hasValidated = false }) } + $: valid = - getErrorCount(errors) === 0 && allRequiredAttributesSet(relationshipType) + getErrorCount(errors) === 0 && + allRequiredAttributesSet(relationshipType) && + fromId && + toId $: isManyToMany = relationshipType === RelationshipType.MANY_TO_MANY $: isManyToOne = relationshipType === RelationshipType.MANY_TO_ONE ||