We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36ce3ba commit dd32fc0Copy full SHA for dd32fc0
src/validators/literal.rs
@@ -182,7 +182,7 @@ impl<T: Debug> LiteralLookup<T> {
182
return Ok(None);
183
};
184
185
- if py_input.is_instance(get_decimal_type(py)).is_err() {
+ if let Ok(false) = py_input.is_instance(get_decimal_type(py)) {
186
187
}
188
tests/validators/test_enums.py
@@ -377,3 +377,6 @@ class MyEnum(Enum):
377
)
378
with pytest.raises(ValidationError):
379
v.validate_python(Decimal(2))
380
+
381
+ with pytest.raises(ValidationError):
382
+ v.validate_python((1, 2))
0 commit comments