aboutsummaryrefslogtreecommitdiff
path: root/mammoth/docx/numbering_xml.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2025-09-11 15:31:41 +0100
committerMichael Williamson <mike@zwobble.org>2025-09-11 15:31:41 +0100
commita828b007d3fffc17235c120f79d4082047cd5f94 (patch)
tree420996a9606c58f3ec4ea31e1a98aa3271106f7d /mammoth/docx/numbering_xml.py
parent82bc0fe4769483196ce8cc8147fab16b38c52e8f (diff)
Avoid duplicating default level index
Diffstat (limited to 'mammoth/docx/numbering_xml.py')
-rw-r--r--mammoth/docx/numbering_xml.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mammoth/docx/numbering_xml.py b/mammoth/docx/numbering_xml.py
index 4614d0e..0bd1952 100644
--- a/mammoth/docx/numbering_xml.py
+++ b/mammoth/docx/numbering_xml.py
@@ -51,7 +51,7 @@ def _read_abstract_num_levels(element):
else:
levels[level.level_index] = level
- if "0" not in levels and level_without_index is not None:
+ if level_without_index is not None and level_without_index.level_index not in levels:
levels[level_without_index.level_index] = level_without_index
return levels