Commit 147ad5b5 authored by jyong's avatar jyong

delete all block type page and database

parent 5c355f44
...@@ -144,7 +144,9 @@ class NotionOAuth(OAuthDataSource): ...@@ -144,7 +144,9 @@ class NotionOAuth(OAuthDataSource):
icon = None icon = None
parent = page_result['parent'] parent = page_result['parent']
parent_type = parent['type'] parent_type = parent['type']
if parent_type == 'workspace': if parent_type == 'block_id':
continue
elif parent_type == 'workspace':
parent_id = 'root' parent_id = 'root'
else: else:
parent_id = parent[parent_type] parent_id = parent[parent_type]
...@@ -181,7 +183,9 @@ class NotionOAuth(OAuthDataSource): ...@@ -181,7 +183,9 @@ class NotionOAuth(OAuthDataSource):
icon = None icon = None
parent = database_result['parent'] parent = database_result['parent']
parent_type = parent['type'] parent_type = parent['type']
if parent_type == 'workspace': if parent_type == 'block_id':
continue
elif parent_type == 'workspace':
parent_id = 'root' parent_id = 'root'
else: else:
parent_id = parent[parent_type] parent_id = parent[parent_type]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment