Corrections for IS_INT_IN_RANGE

This commit is contained in:
Stefan Pochmann
2013-10-12 21:10:29 +02:00
parent c3a7486930
commit 667069b573
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -743,7 +743,7 @@ class IS_INT_IN_RANGE(Validator):
% dict(min=self.minimum, max=self.maximum - 1)
def __call__(self, value):
if value and regex_isint.match(str(value)):
if value is not None and regex_isint.match(str(value)):
v = int(value)
if ((self.minimum is None or v >= self.minimum) and
(self.maximum is None or v < self.maximum)):