Skip to content
Snippets Groups Projects
Commit 582b00ea authored by kfilippopolitis's avatar kfilippopolitis
Browse files

Relaxed the validation of the filter values.

parent 992b06b0
No related branches found
Tags 0.20.1
No related merge requests found
......@@ -135,7 +135,9 @@ def _check_value_type(column: str, value, cdes):
def _check_value_column_same_type(column, value, cdes):
column_sql_type = cdes[column].sql_type
dtype = DType.from_cde(column_sql_type)
if type(value) is not dtype.to_py():
try:
value = dtype.to_py()(value)
except ValueError:
raise FilterError(
f"{column}'s type: {column_sql_type} was different from the type of the given value:{type(value)}"
)
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment