From 81c36b1d262118afb8f59c0cae013ed53450bf60 Mon Sep 17 00:00:00 2001 From: Adam Bryzak Date: Mon, 9 Apr 2012 23:22:15 +1000 Subject: [PATCH] Handle empty requires list when wrapping db.table.field.requires in IS_EMPTY_OR --- gluon/validators.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gluon/validators.py b/gluon/validators.py index 3a8d0ce7..31d440c6 100644 --- a/gluon/validators.py +++ b/gluon/validators.py @@ -2483,6 +2483,7 @@ class IS_EMPTY_OR(Validator): if empty: return (self.null, None) if isinstance(self.other, (list, tuple)): + error = None for item in self.other: value, error = item(value) if error: break