Author: phd
Date: 2009-09-28 08:22:51 -0600 (Mon, 28 Sep 2009)
New Revision: 4003
Modified:
SQLObject/trunk/docs/News.txt
SQLObject/trunk/sqlobject/dbconnection.py
Log:
Merged r4002 from branch 0.11: fixed an obscure bug in ConnectionHub
triggered by an SQLObject class whose instances can be coerced to boolean False
(bug 2866300).
Modified: SQLObject/trunk/docs/News.txt
===================================================================
--- SQLObject/trunk/docs/News.txt 2009-09-28 14:22:02 UTC (rev 4002)
+++ SQLObject/trunk/docs/News.txt 2009-09-28 14:22:51 UTC (rev 4003)
@@ -113,6 +113,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/trunk/sqlobject/dbconnection.py
===================================================================
--- SQLObject/trunk/sqlobject/dbconnection.py 2009-09-28 14:22:02 UTC (rev 4002)
+++ SQLObject/trunk/sqlobject/dbconnection.py 2009-09-28 14:22:51 UTC (rev 4003)
@@ -832,7 +832,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()
|