Skip to content

Commit

Permalink
chore: Skip reading external blocks in NotionConnector
Browse files Browse the repository at this point in the history
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 danswer-ai#1761.
  • Loading branch information
colachg committed Jul 3, 2024
1 parent 2db128f commit 8ed5687
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions backend/danswer/connectors/notion/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,13 @@ def _read_blocks(
)
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"]:
Expand Down

0 comments on commit 8ed5687

Please sign in to comment.