Feature/self host notion import (#397)

This commit is contained in:
Jyong 2023-06-17 19:50:21 +08:00 • committed by GitHub
commit 226f28edcb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 73 additions and 6 deletions

View file

@ -84,7 +84,8 @@ class NotionPageReader(BaseReader):
heading = text
result_block_id = result["id"]
has_children = result["has_children"]
if has_children:
block_type = result["type"]
if has_children and block_type != 'child_page':
children_text = self._read_block(
result_block_id, num_tabs=num_tabs + 1
)
@ -184,7 +185,8 @@ class NotionPageReader(BaseReader):
result_block_id = result["id"]
has_children = result["has_children"]
if has_children:
block_type = result["type"]
if has_children and block_type != 'child_page':
children_text = self._read_block(
result_block_id, num_tabs=num_tabs + 1
)