From e48074ff545fafc3d7f6d90563a4d50b1cc4daed Mon Sep 17 00:00:00 2001 From: mdipierro Date: Fri, 15 Mar 2013 10:00:45 -0500 Subject: [PATCH] fixed issue 1391, sub for decimal --- VERSION | 2 +- gluon/dal.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index fd74508c..e5e37091 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.4.4-stable+timestamp.2013.03.15.09.49.00 +Version 2.4.4-stable+timestamp.2013.03.15.10.00.02 diff --git a/gluon/dal.py b/gluon/dal.py index a9636a16..313944d1 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -8817,6 +8817,8 @@ class Expression(object): result_type = 'integer' elif self.type in ['date','time','datetime','double','float']: result_type = 'double' + elif self.type.startswith('decimal('): + result_type = self.type else: raise SyntaxError("subtraction operation not supported for type") return Expression(db,db._adapter.SUB,self,other,result_type)