Skip to content

Commit

Permalink
Update children calls
Browse files Browse the repository at this point in the history
  • Loading branch information
VikParuchuri committed Feb 19, 2025
1 parent 280580e commit f0c9f22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions marker/schema/groups/page.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def get_image(self, *args, highres: bool = False, remove_blocks: Sequence[BlockT
if remove_blocks:
image = image.copy()
draw = ImageDraw.Draw(image)
bad_blocks = [block for block in self.children if block.block_type in remove_blocks]
bad_blocks = [block for block in self.current_children if block.block_type in remove_blocks]
for bad_block in bad_blocks:
poly = bad_block.polygon.rescale(self.polygon.size, image.size).polygon
poly = [(int(p[0]), int(p[1])) for p in poly]
Expand Down Expand Up @@ -274,7 +274,7 @@ def aggregate_block_metadata(self) -> BlockMetadata:
if self.metadata is None:
self.metadata = BlockMetadata()

for block in self.children:
for block in self.current_children:
if block.metadata is not None:
self.metadata = self.metadata.merge(block.metadata)
return self.metadata

0 comments on commit f0c9f22

Please sign in to comment.