Skip to content

Commit 8aa6f44

Browse files
UdaySagar-Gitclaude
andcommitted
fix(dq): reorder Union type to prioritize int over str in DQCondition value
Ensures integer values are correctly parsed instead of being coerced to strings when both types are valid in the Union. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 36b5900 commit 8aa6f44

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

pyatlan/model/dq_rule_conditions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class DQCondition(AtlanObject):
1717
"""Data quality rule condition."""
1818

1919
type: DataQualityRuleTemplateConfigRuleConditions = Field(description="")
20-
value: Optional[Union[str, int, List[str], Dict[str, Any]]] = Field(
20+
value: Optional[Union[int, str, List[str], Dict[str, Any]]] = Field(
2121
default=None, description=""
2222
)
2323
min_value: Optional[int] = Field(default=None, description="")
@@ -30,7 +30,7 @@ class DQCondition(AtlanObject):
3030
def __init__(
3131
self,
3232
type: DataQualityRuleTemplateConfigRuleConditions,
33-
value: Optional[Union[str, int, List[str], Dict[str, Any]]] = None,
33+
value: Optional[Union[int, str, List[str], Dict[str, Any]]] = None,
3434
min_value: Optional[int] = None,
3535
max_value: Optional[int] = None,
3636
reference_table: Optional[str] = None,
@@ -148,7 +148,7 @@ def __init__(self) -> None:
148148
def add_condition(
149149
self,
150150
type: DataQualityRuleTemplateConfigRuleConditions,
151-
value: Optional[Union[str, int, List[str]]] = None,
151+
value: Optional[Union[int, str, List[str]]] = None,
152152
min_value: Optional[int] = None,
153153
max_value: Optional[int] = None,
154154
reference_table: Optional[str] = None,

pyatlan_v9/model/dq_rule_conditions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class DQCondition(msgspec.Struct, kw_only=True):
1919
type: DataQualityRuleTemplateConfigRuleConditions
2020
"""Condition type."""
2121

22-
value: Union[str, int, list[str], dict[str, Any], None] = None
22+
value: Union[int, str, list[str], dict[str, Any], None] = None
2323
"""Condition value."""
2424

2525
min_value: Union[int, None] = None
@@ -129,7 +129,7 @@ def __init__(self) -> None:
129129
def add_condition(
130130
self,
131131
type: DataQualityRuleTemplateConfigRuleConditions,
132-
value: Union[str, int, list[str], None] = None,
132+
value: Union[int, str, list[str], None] = None,
133133
min_value: Union[int, None] = None,
134134
max_value: Union[int, None] = None,
135135
reference_table: Union[str, None] = None,

0 commit comments

Comments
 (0)