From 0be4abe9c24bccd4f2dfe0fd698f81d63b508668 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Mon, 22 Oct 2012 15:07:38 -0500 Subject: [PATCH] minor fix in dal for rare condition --- VERSION | 2 +- gluon/dal.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 6b905346..d833dcfe 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.2.1 (2012-10-21 10:54:10) stable +Version 2.2.1 (2012-10-22 15:07:32) stable diff --git a/gluon/dal.py b/gluon/dal.py index deecf6a6..e2088dc9 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -8607,12 +8607,13 @@ class Field(Expression): return value def validate(self, value): - if not self.requires: + if not self.requires or self.requires == DEFAULT: return (value, None) requires = self.requires if not isinstance(requires, (list, tuple)): requires = [requires] for validator in requires: + print validator (value, error) = validator(value) if error: return (value, error)