From 69f9cf28dfa9539868ab37c1d6651b5216ea7a75 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Wed, 11 Dec 2013 20:33:24 -0600 Subject: [PATCH] fixed db(((db.table1.field1 + db.table1.field2)>4)).select(), thanks Boris --- VERSION | 2 +- gluon/dal.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 05a0c515..aa97e7a4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.8.2-stable+timestamp.2013.12.09.21.27.36 +Version 2.8.2-stable+timestamp.2013.12.11.20.32.28 diff --git a/gluon/dal.py b/gluon/dal.py index 3108a781..902d16a1 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -1460,7 +1460,7 @@ class BaseAdapter(ConnectionPool): return '(%s)' % ' || '.join(self.expand(x,'string') for x in items) def ADD(self, first, second): - if self.is_numerical_type(first.type): + if self.is_numerical_type(first.type) or isinstance(first.type, gluon.dal.Field): return '(%s + %s)' % (self.expand(first), self.expand(second, first.type)) else: