PR suggestion.
This commit is contained in:
parent
5373b867e1
commit
58d7293798
|
@ -24,12 +24,7 @@ function isForeignKey(key: string, table: Table) {
|
||||||
const relationships = Object.values(table.schema).filter(
|
const relationships = Object.values(table.schema).filter(
|
||||||
column => column.type === FieldType.LINK
|
column => column.type === FieldType.LINK
|
||||||
)
|
)
|
||||||
for (let relationship of relationships) {
|
return relationships.some(relationship => relationship.foreignKey === key)
|
||||||
if (relationship.foreignKey === key) {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getDatasourceAndQuery(json: any) {
|
export async function getDatasourceAndQuery(json: any) {
|
||||||
|
|
Loading…
Reference in New Issue