From 81c1b7c823cd2d4c712b159a821b27307170a381 Mon Sep 17 00:00:00 2001 From: Henry Fontanier Date: Tue, 24 Oct 2023 14:28:40 +0200 Subject: [PATCH] enh: use upsert in cache blocks (#2238) --- connectors/src/connectors/notion/temporal/activities.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connectors/src/connectors/notion/temporal/activities.ts b/connectors/src/connectors/notion/temporal/activities.ts index c378513911c8..a0badc1c4db5 100644 --- a/connectors/src/connectors/notion/temporal/activities.ts +++ b/connectors/src/connectors/notion/temporal/activities.ts @@ -1160,7 +1160,7 @@ export async function cacheBlockChildren({ ); await Promise.all( parsedBlocks.map((block, i) => - NotionConnectorBlockCacheEntry.create({ + NotionConnectorBlockCacheEntry.upsert({ notionPageId: pageId, notionBlockId: block.id, blockType: block.type,