This commit is contained in:
Yuhong Sun 2024-10-27 16:45:11 -07:00 committed by GitHub
parent 1187849afe
commit 23988f8c49
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -44,8 +44,6 @@ class BookstackConnector(LoadConnector, PollConnector):
start: SecondsSinceUnixEpoch | None = None, start: SecondsSinceUnixEpoch | None = None,
end: SecondsSinceUnixEpoch | None = None, end: SecondsSinceUnixEpoch | None = None,
) -> tuple[list[Document], int]: ) -> tuple[list[Document], int]:
doc_batch: list[Document] = []
params = { params = {
"count": str(batch_size), "count": str(batch_size),
"offset": str(start_ind), "offset": str(start_ind),
@ -63,8 +61,7 @@ class BookstackConnector(LoadConnector, PollConnector):
) )
batch = bookstack_client.get(endpoint, params=params).get("data", []) batch = bookstack_client.get(endpoint, params=params).get("data", [])
for item in batch: doc_batch = [transformer(bookstack_client, item) for item in batch]
doc_batch.append(transformer(bookstack_client, item))
return doc_batch, len(batch) return doc_batch, len(batch)