Consider any integer greater than PG allows, to be invalid grid filter value

this feels pretty hacky...would be nice to come up with a better way
This commit is contained in:
Lance Edgar 2018-06-29 12:56:22 -05:00
parent 4ffd0df7c1
commit 944e896196

View file

@ -472,6 +472,10 @@ class AlchemyIntegerFilter(AlchemyNumericFilter):
return True return True
if not value.isdigit(): if not value.isdigit():
return True return True
# TODO: this one is to avoid DataError from PG, but perhaps that
# isn't a good enough reason to make this global logic?
if int(value) > 2147483647:
return True
return False return False