From 7cbdd1391b7ecf61df2b3382c3f63f37b5f304f2 Mon Sep 17 00:00:00 2001 From: Jean Date: Tue, 22 Oct 2024 23:29:42 -0300 Subject: [PATCH] Fix: correction that considers spaces with zeros --- docxtpl/inline_image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docxtpl/inline_image.py b/docxtpl/inline_image.py index 2d39e07..f086184 100644 --- a/docxtpl/inline_image.py +++ b/docxtpl/inline_image.py @@ -61,7 +61,7 @@ def _insert_image(self): self.width, self.height, ) - if self.spacing_left or self.spacing_right or self.spacing_top or self.spacing_bottom: + if self.spacing_left is not None or self.spacing_right is not None or self.spacing_top is not None or self.spacing_bottom is not None: if self.spacing_top: pic.set('distT', str(self.spacing_top)) if self.spacing_bottom: