fixed db(((db.table1.field1 + db.table1.field2)>4)).select(), thanks Boris

This commit is contained in:
mdipierro
2013-12-11 20:33:24 -06:00
parent 81cb51bb8d
commit 69f9cf28df
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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: