Skip to content

Commit 6eb5d46

Browse files
committed
fixes parallel query execution not considering filters
1 parent f883e36 commit 6eb5d46

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

infrahub_sdk/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ async def process_batch() -> tuple[list[InfrahubNode], list[InfrahubNode]]:
781781
nodes = []
782782
related_nodes = []
783783
batch_process = await self.create_batch()
784-
count = await self.count(kind=schema.kind)
784+
count = await self.count(kind=schema.kind, **filters)
785785
total_pages = (count + pagination_size - 1) // pagination_size
786786

787787
for page_number in range(1, total_pages + 1):
@@ -1920,7 +1920,7 @@ def process_batch() -> tuple[list[InfrahubNodeSync], list[InfrahubNodeSync]]:
19201920
related_nodes = []
19211921
batch_process = self.create_batch()
19221922

1923-
count = self.count(kind=schema.kind)
1923+
count = self.count(kind=schema.kind, **filters)
19241924
total_pages = (count + pagination_size - 1) // pagination_size
19251925

19261926
for page_number in range(1, total_pages + 1):

0 commit comments

Comments
 (0)