We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4fd148d commit a7b2fa5Copy full SHA for a7b2fa5
src/sagemaker/workflow/conditions.py
@@ -79,7 +79,7 @@ def to_request(self) -> RequestType:
79
"""Get the request structure for workflow service calls."""
80
return {
81
"Type": self.condition_type.value,
82
- "LeftValue": self.left.expr,
+ "LeftValue": primitive_or_expr(self.left),
83
"RightValue": primitive_or_expr(self.right),
84
}
85
tests/unit/sagemaker/workflow/test_conditions.py
@@ -165,3 +165,12 @@ def test_condition_or():
165
},
166
],
167
168
+
169
170
+def test_left_and_right_primitives():
171
+ cond = ConditionEquals(left=2, right=1)
172
+ assert cond.to_request() == {
173
+ "Type": "Equals",
174
+ "LeftValue": 2,
175
+ "RightValue": 1,
176
+ }
0 commit comments