From 98b2eed2682384e2b20bce3d3de5430db2bbabc7 Mon Sep 17 00:00:00 2001 From: Massimo Di Pierro Date: Thu, 12 Jan 2012 14:04:37 -0600 Subject: [PATCH] fixed a problem with translation in validators, thanks niphlod --- VERSION | 2 +- gluon/validators.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 68c8b281..6bac85e1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 1.99.4 (2012-01-12 14:01:39) stable +Version 1.99.4 (2012-01-12 14:04:26) stable diff --git a/gluon/validators.py b/gluon/validators.py index 543435cd..29f7b179 100644 --- a/gluon/validators.py +++ b/gluon/validators.py @@ -56,7 +56,9 @@ __all__ = [ ] def translate(text): - if isinstance(text,(str,unicode)): + if text is None: + return None + elif isinstance(text,(str,unicode)): from globals import current if hasattr(current,'T'): return str(current.T(text))