Case insensitive table fetch
This commit is contained in:
parent
99c2a043b8
commit
e53f7a1d28
|
@ -58,7 +58,9 @@ exports.buildSchemaFromDb = async function (ctx) {
|
|||
datasource.entities = {}
|
||||
}
|
||||
for (let key in tables) {
|
||||
if (tablesFilter.includes(key)) {
|
||||
if (
|
||||
tablesFilter.some(filter => filter.toLowerCase() === key.toLowerCase())
|
||||
) {
|
||||
datasource.entities[key] = tables[key]
|
||||
}
|
||||
}
|
||||
|
@ -237,7 +239,7 @@ const buildSchemaHelper = async datasource => {
|
|||
await connector.buildSchema(datasource._id, datasource.entities)
|
||||
|
||||
// make sure they all have a display name selected
|
||||
for (let entity of Object.values(datasource.entities)) {
|
||||
for (let entity of Object.values(datasource.entities ?? {})) {
|
||||
if (entity.primaryDisplay) {
|
||||
continue
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue