Final fix - making sure relationships can be built from table UI.

This commit is contained in:
mike12345567 2023-02-02 17:37:41 +00:00
parent 01edfba90e
commit 90c2e69efe
1 changed files with 2 additions and 5 deletions

View File

@ -48,11 +48,7 @@
)
let errors = {}
let fromPrimary, fromForeign, fromColumn, toColumn
let fromId = selectedFromTable?._id,
toId,
throughId,
throughToKey,
throughFromKey
let fromId, toId, throughId, throughToKey, throughFromKey
let isManyToMany, isManyToOne, relationshipType
let hasValidated = false
@ -316,6 +312,7 @@
relationshipType =
fromRelationship.relationshipType || RelationshipTypes.MANY_TO_ONE
if (selectedFromTable) {
fromId = selectedFromTable._id
fromColumn = selectedFromTable.name
fromPrimary = selectedFromTable?.primary[0] || null
}