From 676b0ec5e94d760b3bd92863630780ce7d48b9f9 Mon Sep 17 00:00:00 2001 From: Henry Fontanier Date: Thu, 7 Mar 2024 18:35:46 +0100 Subject: [PATCH] fix: actually resolve DB parents (#4207) Co-authored-by: Henry Fontanier --- connectors/src/connectors/notion/temporal/activities.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/connectors/src/connectors/notion/temporal/activities.ts b/connectors/src/connectors/notion/temporal/activities.ts index 82d1edc3aac5..ab434214a5b2 100644 --- a/connectors/src/connectors/notion/temporal/activities.ts +++ b/connectors/src/connectors/notion/temporal/activities.ts @@ -518,8 +518,8 @@ export async function upsertDatabaseInConnectorsDb( connectorId, notionDatabaseId: databaseId, runTimestamp, - parentType: parsedDb ? parsedDb.parentType : null, - parentId: parsedDb ? parsedDb.parentId : null, + parentType: parentType ?? null, + parentId: parentId ?? null, title: parsedDb ? parsedDb.title : null, notionUrl: parsedDb ? parsedDb.url : null, lastCreatedOrMovedRunTs: createdOrMoved ? runTimestamp : undefined, @@ -1534,7 +1534,7 @@ async function maybeAddParentToResourcesToCheck({ } } -async function resolveResourceParent({ +export async function resolveResourceParent({ parentId, parentType, pageOrDbId,