This commit is contained in:
Eric Lapouyade 2020-04-14 10:35:58 +02:00
parent 2b75638aa8
commit ccac13390a
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,7 @@
0.8.1 (2020-04-14)
-------------------
- fix #266
0.8.0 (2020-04-10) 0.8.0 (2020-04-10)
------------------- -------------------
- docxtpl is now able to use latest python-docx (0.8.10). Thanks to Dutchy-@github. - docxtpl is now able to use latest python-docx (0.8.10). Thanks to Dutchy-@github.

View File

@ -7,7 +7,7 @@ Created : 2015-03-12
import functools import functools
import io import io
__version__ = '0.8.0' __version__ = '0.8.1'
from lxml import etree from lxml import etree
from docx import Document from docx import Document
@ -492,7 +492,9 @@ class DocxTemplate(object):
self.zipname_to_replace[zipname] = fh.read() self.zipname_to_replace[zipname] = fh.read()
def post_processing(self, docx_file): 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'): if hasattr(docx_file, 'read'):
tmp_file = io.BytesIO() tmp_file = io.BytesIO()