Making sure relationships are valid before displaying them.
This commit is contained in:
parent
1b4cb0e2eb
commit
f6acfc2795
|
@ -44,7 +44,9 @@
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
return Object.values(relatedColumns).map(({ from, to, through }) => {
|
return Object.values(relatedColumns)
|
||||||
|
.filter(({ from, to }) => from && to)
|
||||||
|
.map(({ from, to, through }) => {
|
||||||
return {
|
return {
|
||||||
tables: `${from.tableName} ${through ? "↔" : "→"} ${to.tableName}`,
|
tables: `${from.tableName} ${through ? "↔" : "→"} ${to.tableName}`,
|
||||||
columns: `${from.name} to ${to.name}`,
|
columns: `${from.name} to ${to.name}`,
|
||||||
|
|
Loading…
Reference in New Issue