Author: phd
Date: 2009-09-28 08:20:15 -0600 (Mon, 28 Sep 2009)
New Revision: 4001
Modified:
SQLObject/branches/0.10/docs/News.txt
SQLObject/branches/0.10/sqlobject/dbconnection.py
Log:
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.10/docs/News.txt
===================================================================
--- SQLObject/branches/0.10/docs/News.txt 2009-09-27 15:50:19 UTC (rev 4000)
+++ SQLObject/branches/0.10/docs/News.txt 2009-09-28 14:20:15 UTC (rev 4001)
@@ -12,6 +12,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.10/sqlobject/dbconnection.py
===================================================================
--- SQLObject/branches/0.10/sqlobject/dbconnection.py 2009-09-27 15:50:19 UTC (rev 4000)
+++ SQLObject/branches/0.10/sqlobject/dbconnection.py 2009-09-28 14:20:15 UTC (rev 4001)
@@ -833,7 +833,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()
|