Skip to content

Commit

Permalink
Change to isinstance for type checking
Browse files Browse the repository at this point in the history
  • Loading branch information
bartbroere authored Oct 24, 2024
1 parent 0d616ad commit 0ef74a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docxtpl/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def render_footnotes(
for section in self.docx.sections:
for part in section.part.package.parts:
if part.content_type == 'application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml':
xml = self.patch_xml(part.blob.decode('utf-8') if type(part.blob) is bytes else part.blob)
xml = self.patch_xml(part.blob.decode('utf-8') if isinstance(part.blob, bytes) else part.blob)
xml = self.render_xml_part(xml, part, context, jinja_env)
part._blob = xml

Expand Down

0 comments on commit 0ef74a7

Please sign in to comment.