From 89021b6409ad63f1e6ada4ab07055aa36af87fbd Mon Sep 17 00:00:00 2001 From: mdipierro Date: Sat, 6 Apr 2013 09:40:07 -0500 Subject: [PATCH] fixed Issue 1432:Oracle: invalid SQL generated when requires = IS_NOT_IN_DB, thanks jphillips --- VERSION | 2 +- gluon/validators.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index d033d854..f4be7625 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.4.5-stable+timestamp.2013.04.06.09.37.36 +Version 2.4.5-stable+timestamp.2013.04.06.09.39.30 diff --git a/gluon/validators.py b/gluon/validators.py index 576481a5..bd449af3 100644 --- a/gluon/validators.py +++ b/gluon/validators.py @@ -652,7 +652,7 @@ class IS_NOT_IN_DB(Validator): if row and any(str(row[f]) != str(id[f]) for f in id): return (value, translate(self.error_message)) else: - row = subset.select(table._id, limitby=(0, 1)).first() + row = subset.select(table._id, field, limitby=(0, 1)).first() if row and str(row.id) != str(id): return (value, translate(self.error_message)) return (value, None)