mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-06-14 18:10:58 +02:00
fix: Notion connector now skips parsing ai_block blocks instead of erroring out (ai_blocks are currently unsupported by Notion API)
This commit is contained in:
parent
236fa947ee
commit
01bd1a84c4
@ -202,6 +202,12 @@ class NotionConnector(LoadConnector, PollConnector):
|
|||||||
result_type = result["type"]
|
result_type = result["type"]
|
||||||
result_obj = result[result_type]
|
result_obj = result[result_type]
|
||||||
|
|
||||||
|
if result_type == "ai_block":
|
||||||
|
logger.warning(f"Skipping 'ai_block' ('{result_block_id}') for page '{page_block_id}': "
|
||||||
|
f"Notion API does not currently support reading AI blocks (as of 24/02/09) "
|
||||||
|
f"(discussion: https://github.com/danswer-ai/danswer/issues/1053)")
|
||||||
|
continue
|
||||||
|
|
||||||
cur_result_text_arr = []
|
cur_result_text_arr = []
|
||||||
if "rich_text" in result_obj:
|
if "rich_text" in result_obj:
|
||||||
for rich_text in result_obj["rich_text"]:
|
for rich_text in result_obj["rich_text"]:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user