[SQL-CVS] r488 - trunk/SQLObject/sqlobject
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <sub...@co...> - 2004-12-15 16:39:56
|
Author: ianb Date: 2004-12-15 16:39:41 +0000 (Wed, 15 Dec 2004) New Revision: 488 Modified: trunk/SQLObject/sqlobject/col.py Log: Shouldn't try to convert values to integers when testing them for truth -- they may not be coerceable at all, and it's debatable whether '0' should be false. Modified: trunk/SQLObject/sqlobject/col.py =================================================================== --- trunk/SQLObject/sqlobject/col.py 2004-12-15 09:03:57 UTC (rev 487) +++ trunk/SQLObject/sqlobject/col.py 2004-12-15 16:39:41 UTC (rev 488) @@ -386,7 +386,7 @@ return sqlbuilder.FALSE def toPython(self, value, state): - if not value or not int(value): + if not value: return sqlbuilder.FALSE else: return sqlbuilder.TRUE |