fix: Stop reading Notion pages on polling

This commit is contained in:
2pac
2024-04-12 13:26:18 +02:00
committed by Chris Weaver
parent b59912884b
commit 6be5f51440

View File

@@ -433,8 +433,8 @@ class NotionConnector(LoadConnector, PollConnector):
)
if len(pages) > 0:
yield from batch_generator(self._read_pages(pages), self.batch_size)
if db_res.has_more:
query_dict["start_cursor"] = db_res.next_cursor
if db_res.has_more:
query_dict["start_cursor"] = db_res.next_cursor
else:
break