aws-samples / amazon-textract-response-parser

Parse JSON response of Amazon Textract
Apache License 2.0
218 stars 95 forks source link

fix(python): fix get_blocks_by_type for pages without relationships #163

Closed felixscherz closed 5 months ago

felixscherz commented 11 months ago

This fixes #155.

Instead of falling back to searching the entire document for blocks, the method now returns an empty list if the page passed in as an argument does not have any relationships.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.