Skip to content

Commit 0ef74a7

Browse files
authored
Change to isinstance for type checking
1 parent 0d616ad commit 0ef74a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docxtpl/template.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ def render_footnotes(
360360
for section in self.docx.sections:
361361
for part in section.part.package.parts:
362362
if part.content_type == 'application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml':
363-
xml = self.patch_xml(part.blob.decode('utf-8') if type(part.blob) is bytes else part.blob)
363+
xml = self.patch_xml(part.blob.decode('utf-8') if isinstance(part.blob, bytes) else part.blob)
364364
xml = self.render_xml_part(xml, part, context, jinja_env)
365365
part._blob = xml
366366

0 commit comments

Comments
 (0)