[SQL-CVS] r4161 - in SQLObject/trunk: docs sqlobject
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <sub...@co...> - 2010-04-09 18:14:09
|
Author: phd Date: 2010-04-09 12:14:03 -0600 (Fri, 09 Apr 2010) New Revision: 4161 Modified: SQLObject/trunk/docs/News.txt SQLObject/trunk/sqlobject/main.py Log: Fixed a bug in replacing self._connection in the case no previous self._connection has been set. Modified: SQLObject/trunk/docs/News.txt =================================================================== --- SQLObject/trunk/docs/News.txt 2010-04-09 18:12:47 UTC (rev 4160) +++ SQLObject/trunk/docs/News.txt 2010-04-09 18:14:03 UTC (rev 4161) @@ -37,6 +37,11 @@ * Renamed db_encoding to dbEncoding in UnicodeStringValidator. +SQLObject 0.12.3 +================ + +* Bugfixes ported from `SQLObject 0.11.5`_. + SQLObject 0.12.2 ================ @@ -103,6 +108,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/trunk/sqlobject/main.py =================================================================== --- SQLObject/trunk/sqlobject/main.py 2010-04-09 18:12:47 UTC (rev 4160) +++ SQLObject/trunk/sqlobject/main.py 2010-04-09 18:14:03 UTC (rev 4161) @@ -921,7 +921,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. @@ -1208,7 +1209,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 |