1
0
Fork 0
mirror of synced 2024-10-03 10:36:59 +13:00

PR suggestion.

This commit is contained in:
mike12345567 2023-06-22 13:25:37 +01:00
parent 5373b867e1
commit 58d7293798

View file

@ -24,12 +24,7 @@ function isForeignKey(key: string, table: Table) {
const relationships = Object.values(table.schema).filter(
column => column.type === FieldType.LINK
)
for (let relationship of relationships) {
if (relationship.foreignKey === key) {
return true
}
}
return false
return relationships.some(relationship => relationship.foreignKey === key)
}
export async function getDatasourceAndQuery(json: any) {