Skip to content

Commit

Permalink
Notion Connector to 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 onyx-dot-app#1761.

Co-authored-by: Cola Chen <6825116+colachg@users.noreply.github.com>
  • Loading branch information
2 people authored and rajiv chodisetti committed Oct 2, 2024
1 parent 1a9d8c9 commit 45a3a90
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 45a3a90

Please sign in to comment.