From ccac13390ab5f6df53476b7d0a2a7b47c98a4f00 Mon Sep 17 00:00:00 2001 From: Eric Lapouyade Date: Tue, 14 Apr 2020 10:35:58 +0200 Subject: [PATCH] fix #266 --- CHANGES.rst | 4 ++++ docxtpl/__init__.py | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index f306db7..41e77d2 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,7 @@ +0.8.1 (2020-04-14) +------------------- +- fix #266 + 0.8.0 (2020-04-10) ------------------- - docxtpl is now able to use latest python-docx (0.8.10). Thanks to Dutchy-@github. diff --git a/docxtpl/__init__.py b/docxtpl/__init__.py index 40a6691..2ab1e9e 100644 --- a/docxtpl/__init__.py +++ b/docxtpl/__init__.py @@ -7,7 +7,7 @@ Created : 2015-03-12 import functools import io -__version__ = '0.8.0' +__version__ = '0.8.1' from lxml import etree from docx import Document @@ -492,7 +492,9 @@ class DocxTemplate(object): self.zipname_to_replace[zipname] = fh.read() def post_processing(self, docx_file): - if self.crc_to_new_media or self.crc_to_new_embedded: + if ( self.crc_to_new_media or + self.crc_to_new_embedded or + self.zipname_to_replace ): if hasattr(docx_file, 'read'): tmp_file = io.BytesIO()