From: Rick Morrison Date: Wed, 4 Apr 2007 15:03:32 +0000 (+0000) Subject: explicit zero was failing for float cols X-Git-Tag: rel_0_3_7~80 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4c17daacba4862a545ebb1f7b95e053a0e9165e;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git explicit zero was failing for float cols --- diff --git a/lib/sqlalchemy/databases/mssql.py b/lib/sqlalchemy/databases/mssql.py index a2d4ac36e0..41b51d12dd 100644 --- a/lib/sqlalchemy/databases/mssql.py +++ b/lib/sqlalchemy/databases/mssql.py @@ -91,7 +91,9 @@ class MSFloat(sqltypes.Float): def convert_bind_param(self, value, dialect): """By converting to string, we can use Decimal types round-trip.""" - return value and str(value) or None + if not value is None: + return str(value) + return None class MSInteger(sqltypes.Integer): def get_col_spec(self):