Skip to content

Commit

Permalink
[MDS-5536] Fix bug on division by zero (#2707)
Browse files Browse the repository at this point in the history
fix bug.
  • Loading branch information
henryoforeh-dev authored Oct 6, 2023
1 parent 04794a3 commit 2324cc7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ def insert_images(doc, template_data):
raise Exception('Image data is not a valid Base64 string')

image_bytes = io.BytesIO(image_data)
width = Inches(image['width']) if image['width'] else None
height = Inches(image['height']) if image['height'] else None
width = Inches(image['width']) if image['width'] else Inches(7.5)
height = Inches(image['height']) if image['height'] else Inches(11)
paragraph.clear()
run = paragraph.add_run()
run.add_picture(image_bytes, width=width, height=height)
Expand Down

0 comments on commit 2324cc7

Please sign in to comment.