Closed tissieres closed 7 years ago
Thanks !
Sorry about that -- I'm not clear what would cause datatables to send int or bool, but I think the fix looks fine in any case.
The prepare_arguments
function tries to convert the value it gets from the request to a int, a bool before keeping it as a str. If a user searches for the value "1", then it will be converted to int for example.
In the process of fixing this. Easiest way is as follows at start of clean_regex
if not isinstance(regex, (str, unicode)):
return regex
Need to check for (str, unicode) because object may be (is!) unicode. Note in Python > 3.0, unicode is set to str at top of __init__.py
Closing this as it doesn't apply to to the current version of sqlalchemy-datatables
Hi, The clean_regex function added in the last commit expects only a str. But searchValue can be either a bool, a int or a str. A naive fix would be