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 92888ed commit c4fc1a5Copy full SHA for c4fc1a5
src/validators/enum_.rs
@@ -123,7 +123,6 @@ impl<T: EnumValidateValue> Validator for EnumValidator<T> {
123
if let Some(v) = T::validate_value(py, input, &self.lookup, strict)? {
124
return Ok(v);
125
} else if let Ok(res) = class.as_unbound().call1(py, (input.as_python(),)) {
126
- // as a last result, just try to initialize the enum with the input
127
return Ok(res);
128
} else if let Some(ref missing) = self.missing {
129
let enum_value = missing.bind(py).call1((input.to_object(py),)).map_err(|_| {
0 commit comments