From 4860a2ea9dd4bd85a3213551c3991f8e97cdb730 Mon Sep 17 00:00:00 2001 From: Henry Fontanier Date: Wed, 11 Dec 2024 18:27:56 +0100 Subject: [PATCH] add database doc if --- connectors/src/connectors/notion/temporal/activities.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/connectors/src/connectors/notion/temporal/activities.ts b/connectors/src/connectors/notion/temporal/activities.ts index d2683cef0730..383122a3650a 100644 --- a/connectors/src/connectors/notion/temporal/activities.ts +++ b/connectors/src/connectors/notion/temporal/activities.ts @@ -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, @@ -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",