Skip to content

Commit

Permalink
Handle None bounding box when parsing Queries
Browse files Browse the repository at this point in the history
  • Loading branch information
Belval authored Mar 20, 2024
2 parents 927263e + 9489a92 commit 8bb8a1e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions textractor/parsers/response_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,16 +461,16 @@ def _create_query_result_objects(
entity_id=block["Id"],
confidence=block["Confidence"],
result_bbox=BoundingBox.from_normalized_dict(
block.get(
"Geometry",
(
block.get("Geometry") or
{
"BoundingBox": {
"Width": 1.0,
"Height": 1.0,
"Left": 0.0,
"Top": 0.0,
}
},
}
)["BoundingBox"],
spatial_object=page,
),
Expand Down

0 comments on commit 8bb8a1e

Please sign in to comment.