From 944e8961962d521ef608006e116c9c995d062f4f Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Fri, 29 Jun 2018 12:56:22 -0500 Subject: [PATCH] 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 --- tailbone/grids/filters.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tailbone/grids/filters.py b/tailbone/grids/filters.py index 84ab6e61..93c0e669 100644 --- a/tailbone/grids/filters.py +++ b/tailbone/grids/filters.py @@ -472,6 +472,10 @@ class AlchemyIntegerFilter(AlchemyNumericFilter): return True if not value.isdigit(): 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