Avoid encoding values as string, for integer grid filters

grid filter for Catapult Transaction "Status" was not working right b/c that is
an integer in the db, but we were passing encoded string value to SA / query
This commit is contained in:
Lance Edgar 2021-02-20 08:45:15 -06:00
parent 89bb0aa56d
commit 216807503a

View file

@ -591,6 +591,11 @@ class AlchemyIntegerFilter(AlchemyNumericFilter):
return True
return False
def encode_value(self, value):
# ensure we pass integer value to sqlalchemy, so it does not try to
# encode it as a string etc.
return int(value)
class AlchemyBooleanFilter(AlchemyGridFilter):
"""