[SQL-CVS] r4002 - in SQLObject/branches/0.11: docs sqlobject
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <sub...@co...> - 2009-09-28 14:22:11
|
Author: phd Date: 2009-09-28 08:22:02 -0600 (Mon, 28 Sep 2009) New Revision: 4002 Modified: SQLObject/branches/0.11/docs/News.txt SQLObject/branches/0.11/sqlobject/dbconnection.py Log: Merged r4001 from branch 0.10: fixed an obscure bug in ConnectionHub triggered by an SQLObject class whose instances can be coerced to boolean False (bug 2866300). Modified: SQLObject/branches/0.11/docs/News.txt =================================================================== --- SQLObject/branches/0.11/docs/News.txt 2009-09-28 14:20:15 UTC (rev 4001) +++ SQLObject/branches/0.11/docs/News.txt 2009-09-28 14:22:02 UTC (rev 4002) @@ -72,6 +72,9 @@ * Fixed a bug in logging to console - convert unicode to str. +* Fixed an obscure bug in ConnectionHub triggered by an SQLObject class + whose instances can be coerced to boolean False. + SQLObject 0.10.7 ================ Modified: SQLObject/branches/0.11/sqlobject/dbconnection.py =================================================================== --- SQLObject/branches/0.11/sqlobject/dbconnection.py 2009-09-28 14:20:15 UTC (rev 4001) +++ SQLObject/branches/0.11/sqlobject/dbconnection.py 2009-09-28 14:22:02 UTC (rev 4002) @@ -829,7 +829,7 @@ # I'm a little surprised we have to do this, but apparently # the object's private dictionary of attributes doesn't # override this descriptor. - if obj and obj.__dict__.has_key('_connection'): + if (obj is not None) and obj.__dict__.has_key('_connection'): return obj.__dict__['_connection'] return self.getConnection() |