mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-04-10 04:49:29 +02:00
Fix notion recursive search for blocks with children
This commit is contained in:
parent
329824ab22
commit
174f54473e
@ -141,8 +141,15 @@ class NotionConnector(LoadConnector, PollConnector):
|
||||
text = rich_text["text"]["content"]
|
||||
cur_result_text_arr.append(text)
|
||||
|
||||
if result["has_children"] and result_type == "child_page":
|
||||
child_pages.append(result_block_id)
|
||||
if result["has_children"]:
|
||||
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)
|
||||
if cur_result_text:
|
||||
|
Loading…
x
Reference in New Issue
Block a user