Only set table sql prop if it is needed, undefined for consistency as it is with Lucene.

This commit is contained in:
mike12345567 2024-05-24 17:25:49 +01:00
parent 821708e79a
commit 944be41670
1 changed files with 5 additions and 2 deletions

View File

@ -28,13 +28,16 @@ export function processTable(table: Table): Table {
sourceType: TableSourceType.EXTERNAL,
}
} else {
return {
const processed: Table = {
...table,
sql: !!env.SQS_SEARCH_ENABLE,
type: "table",
sourceId: table.sourceId || INTERNAL_TABLE_SOURCE_ID,
sourceType: TableSourceType.INTERNAL,
}
if (env.SQS_SEARCH_ENABLE) {
processed.sql = !!env.SQS_SEARCH_ENABLE
}
return processed
}
}