This commit is contained in:
sladro 2026-03-14 17:02:33 +08:00
parent a8158d8b22
commit 7a72b016ef
2 changed files with 5 additions and 1 deletions

View File

@ -174,7 +174,10 @@ def resolve_generation_options(payload: dict[str, Any]) -> dict[str, Any]:
def _get_xml_element(target: Any) -> Any | None:
return getattr(target, "_element", None) or getattr(target, "element", None)
element = getattr(target, "_element", None)
if element is not None:
return element
return getattr(target, "element", None)
def _set_font_family(target: Any, font_name: str) -> None:
@ -1265,6 +1268,7 @@ def apply_patch_document(patch_data: dict[str, Any]) -> dict[str, Any]:
"in_place": in_place,
"docx_style_profile": options["docx_style_profile"],
"numbering_mode": options["numbering_mode"],
"document_kind": options["document_kind"],
"template_docx": str(Path(options["template_docx"]).resolve()) if options["template_docx"] else None,
"operation_count": len(operations),
"operations": operation_reports,