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