Author: phd
Date: 2010-04-09 12:12:47 -0600 (Fri, 09 Apr 2010)
New Revision: 4160
Modified:
SQLObject/branches/0.12/docs/News.txt
SQLObject/branches/0.12/sqlobject/main.py
Log:
Fixed a bug in replacing self._connection in the case no previous self._connection has been set.
Modified: SQLObject/branches/0.12/docs/News.txt
===================================================================
--- SQLObject/branches/0.12/docs/News.txt 2010-04-09 18:10:56 UTC (rev 4159)
+++ SQLObject/branches/0.12/docs/News.txt 2010-04-09 18:12:47 UTC (rev 4160)
@@ -7,6 +7,11 @@
.. _start:
+SQLObject 0.12.3
+================
+
+* Bugfixes ported from `SQLObject 0.11.5`_.
+
SQLObject 0.12.2
================
@@ -73,6 +78,12 @@
* Removed the last remained string exceptions.
+SQLObject 0.11.5
+================
+
+* Fixed a bug in replacing self._connection in the case no previous
+ self._connection has been set.
+
SQLObject 0.11.4
================
Modified: SQLObject/branches/0.12/sqlobject/main.py
===================================================================
--- SQLObject/branches/0.12/sqlobject/main.py 2010-04-09 18:10:56 UTC (rev 4159)
+++ SQLObject/branches/0.12/sqlobject/main.py 2010-04-09 18:12:47 UTC (rev 4160)
@@ -920,7 +920,8 @@
# If no connection was given, we'll inherit the class
# instance variable which should have a _connection
# attribute.
- if (connection is not None) and (self._connection is not connection):
+ if (connection is not None) and \
+ (getattr(self, '_connection', None) is not connection):
self._connection = connection
# Sometimes we need to know if this instance is
# global or tied to a particular connection.
@@ -1207,7 +1208,7 @@
# Pass the connection object along if we were given one.
if kw.has_key('connection'):
connection = kw.pop('connection')
- if self._connection is not connection:
+ if getattr(self, '_connection', None) is not connection:
self._connection = connection
self.sqlmeta._perConnection = True
|