mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-04-07 19:38:19 +02:00
Fix for notion connector
This commit is contained in:
parent
c4e0face9b
commit
a16ce56f6b
@ -77,8 +77,8 @@ class NotionConnector(LoadConnector, PollConnector):
|
||||
"""Fetch all child blocks via the Notion API."""
|
||||
logger.debug(f"Fetching children of block with ID '{block_id}'")
|
||||
block_url = f"https://api.notion.com/v1/blocks/{block_id}/children"
|
||||
query_dict: dict[str, Any] = {} if not cursor else {"start_cursor": cursor}
|
||||
res = requests.get(block_url, headers=self.headers, json=query_dict)
|
||||
query_params = None if not cursor else {"start_cursor": cursor}
|
||||
res = requests.get(block_url, headers=self.headers, params=query_params)
|
||||
try:
|
||||
res.raise_for_status()
|
||||
except Exception as e:
|
||||
|
Loading…
x
Reference in New Issue
Block a user