Skip to content

Commit

Permalink
add database doc if
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry Fontanier committed Dec 12, 2024
1 parent 024c436 commit 4860a2e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions connectors/src/connectors/notion/temporal/activities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2576,9 +2576,10 @@ export async function upsertDatabaseStructuredDataFromCache({
maxPrefixChars: MAX_PREFIX_CHARS * 2,
});
if (!prefixSection.content) {
const databaseDocId = `notion-database-${databaseId}`;
await upsertToDatasource({
dataSourceConfig,
documentId: `notion-database-${databaseId}`,
documentId: databaseDocId,
documentContent: {
prefix: prefixSection.prefix,
content: csvRows,
Expand All @@ -2592,7 +2593,7 @@ export async function upsertDatabaseStructuredDataFromCache({
timestampMs: upsertAt.getTime(),
tags: [`title:${databaseName}`, "is_database:true"],
// TODO(kw_search) remove legacy
parents: [...parentIds, ...legacyParentIds],
parents: [databaseDocId, ...parentIds, ...legacyParentIds],
loggerArgs,
upsertContext: {
sync_type: "batch",
Expand Down

0 comments on commit 4860a2e

Please sign in to comment.