mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-07-01 10:10:49 +02:00
Fix notion recursive search for blocks with children
This commit is contained in:
@ -141,8 +141,15 @@ class NotionConnector(LoadConnector, PollConnector):
|
|||||||
text = rich_text["text"]["content"]
|
text = rich_text["text"]["content"]
|
||||||
cur_result_text_arr.append(text)
|
cur_result_text_arr.append(text)
|
||||||
|
|
||||||
if result["has_children"] and result_type == "child_page":
|
if result["has_children"]:
|
||||||
child_pages.append(result_block_id)
|
if result_type == "child_page":
|
||||||
|
child_pages.append(result_block_id)
|
||||||
|
else:
|
||||||
|
subblock_result_lines, subblock_child_pages = self._read_blocks(
|
||||||
|
result_block_id
|
||||||
|
)
|
||||||
|
result_lines.extend(subblock_result_lines)
|
||||||
|
child_pages.extend(subblock_child_pages)
|
||||||
|
|
||||||
cur_result_text = "\n".join(cur_result_text_arr)
|
cur_result_text = "\n".join(cur_result_text_arr)
|
||||||
if cur_result_text:
|
if cur_result_text:
|
||||||
|
Reference in New Issue
Block a user