From f9e2d2a556b22bc71bc049c57eedde4511744fff Mon Sep 17 00:00:00 2001 From: oytarhanova Date: Mon, 11 Mar 2024 12:53:27 +0700 Subject: [PATCH] change writing parts order for fixing type detection problem --- src/docx/opc/pkgwriter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/docx/opc/pkgwriter.py b/src/docx/opc/pkgwriter.py index 75af6ac75..abf5ae1a8 100644 --- a/src/docx/opc/pkgwriter.py +++ b/src/docx/opc/pkgwriter.py @@ -25,9 +25,9 @@ def write(pkg_file, pkg_rels, parts): """Write a physical package (.pptx file) to `pkg_file` containing `pkg_rels` and `parts` and a content types stream based on the content types of the parts.""" phys_writer = PhysPkgWriter(pkg_file) - PackageWriter._write_content_types_stream(phys_writer, parts) - PackageWriter._write_pkg_rels(phys_writer, pkg_rels) PackageWriter._write_parts(phys_writer, parts) + PackageWriter._write_pkg_rels(phys_writer, pkg_rels) + PackageWriter._write_content_types_stream(phys_writer, parts) phys_writer.close() @staticmethod