diff --git a/packages/embedder/insertDiscussionsIntoMetadataAndQueue.ts b/packages/embedder/insertDiscussionsIntoMetadataAndQueue.ts index 4383a670ff3..20b505880e6 100644 --- a/packages/embedder/insertDiscussionsIntoMetadataAndQueue.ts +++ b/packages/embedder/insertDiscussionsIntoMetadataAndQueue.ts @@ -35,9 +35,9 @@ export const insertDiscussionsIntoMetadataAndQueue = async ( .with('Metadata', (qc) => qc .selectFrom('Insert') - .fullJoin( + .innerJoin( sql<{model: string}>`UNNEST(ARRAY[${sql.join(tableNames)}])`.as('model'), - (join) => join.onTrue() + (join) => join.on('Insert.id', 'is not', null) ) .select(['id', 'model']) ) diff --git a/packages/embedder/insertMeetingTemplatesIntoMetadataAndQueue.ts b/packages/embedder/insertMeetingTemplatesIntoMetadataAndQueue.ts index 8e20cf6a370..082ede0cfd7 100644 --- a/packages/embedder/insertMeetingTemplatesIntoMetadataAndQueue.ts +++ b/packages/embedder/insertMeetingTemplatesIntoMetadataAndQueue.ts @@ -37,9 +37,9 @@ export const insertMeetingTemplatesIntoMetadataAndQueue = async ( .with('Metadata', (qc) => qc .selectFrom('Insert') - .fullJoin( + .innerJoin( sql<{model: string}>`UNNEST(ARRAY[${sql.join(tableNames)}])`.as('model'), - (join) => join.onTrue() + (join) => join.on('Insert.id', 'is not', null) ) .select(['id', 'model']) )