Notion Connector to skip reading external blocks in NotionConnector

The commit skips reading 'external_object_instance_page' blocks in the NotionConnector due to the lack of support in the Notion API. This change is in response to the issue #1761.

Co-authored-by: Cola Chen <6825116+colachg@users.noreply.github.com>
This commit is contained in:
Cola Chen 2024-09-09 02:34:04 +08:00 committed by GitHub
parent b0568ac8ae
commit e20c825e16
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -237,6 +237,13 @@ class NotionConnector(LoadConnector, PollConnector):
)
continue
if result_type == "external_object_instance_page":
logger.warning(
f"Skipping 'external_object_instance_page' ('{result_block_id}') for base block '{base_block_id}': "
f"Notion API does not currently support reading external blocks (as of 24/07/03) "
f"(discussion: https://github.com/danswer-ai/danswer/issues/1761)")
continue
cur_result_text_arr = []
if "rich_text" in result_obj:
for rich_text in result_obj["rich_text"]: