Skip to content

Commit b327afa

Browse files
Move validate_decimal call to the last one.
1 parent dd32fc0 commit b327afa

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/validators/literal.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,6 @@ impl<T: Debug> LiteralLookup<T> {
126126
}
127127
}
128128

129-
// if the input is a Decimal type, we need to check if its value is in the expected_ints
130-
if let Ok(Some(v)) = self.validate_decimal(py, input) {
131-
return Ok(Some(v));
132-
}
133-
134129
if let Some(expected_strings) = &self.expected_str {
135130
let validation_result = if input.as_python().is_some() {
136131
input.exact_str()
@@ -170,6 +165,11 @@ impl<T: Debug> LiteralLookup<T> {
170165
}
171166
}
172167
};
168+
169+
// if the input is a Decimal type, we need to check if its value is in the expected_ints
170+
if let Ok(Some(v)) = self.validate_decimal(py, input) {
171+
return Ok(Some(v));
172+
}
173173
Ok(None)
174174
}
175175

0 commit comments

Comments
 (0)