Skip to content

Commit

Permalink
fix: Conflicting enum values leads to wrong default values (#806)
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 authored Jun 24, 2023
1 parent 11dbca8 commit c72c4cd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions tests/codegen/test_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,12 @@ def test_initialize(self):
"MergeAttributes",
"ProcessMixedContentClass",
],
30: ["ResetAttributeSequences", "SanitizeAttributesDefaultValue"],
40: ["ValidateAttributesOverrides", "RenameDuplicateAttributes"],
30: [
"ResetAttributeSequences",
"RenameDuplicateAttributes",
"SanitizeAttributesDefaultValue",
],
40: ["ValidateAttributesOverrides"],
50: [
"VacuumInnerClasses",
"CreateCompoundFields",
Expand Down
2 changes: 1 addition & 1 deletion xsdata/codegen/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ def __init__(self, config: GeneratorConfig):
],
Steps.SANITIZE: [
ResetAttributeSequences(),
RenameDuplicateAttributes(),
SanitizeAttributesDefaultValue(self),
],
Steps.RESOLVE: [
ValidateAttributesOverrides(self),
RenameDuplicateAttributes(),
],
Steps.FINALIZE: [
VacuumInnerClasses(),
Expand Down

0 comments on commit c72c4cd

Please sign in to comment.