From b952b75ed46618166fcd877c218f49f30288903f Mon Sep 17 00:00:00 2001 From: anonymous378 <83597074+anonymous378@users.noreply.github.com> Date: Sat, 22 May 2021 19:59:13 -0400 Subject: [PATCH] Bug fix for range_error_message function See https://github.com/web2py/pydal/issues/664 --- pydal/validators.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pydal/validators.py b/pydal/validators.py index c3954d5f3..546c07739 100644 --- a/pydal/validators.py +++ b/pydal/validators.py @@ -820,7 +820,7 @@ def range_error_message(error_message, what_to_enter, minimum, maximum): error_message += " less than or equal to %(max)g" if type(maximum) in integer_types: maximum -= 1 - return translate(error_message) % dict(min=minimum, max=maximum) + return str(translate(error_message)) % dict(min=minimum, max=maximum) class IS_INT_IN_RANGE(Validator):