[POS-commit] r3275 - stoqlib/trunk/stoqlib/domain

Evandro Vale Miquelito evandro at async.com.br
Mon Apr 10 18:42:47 BRT 2006


Author: evandro
Date: Mon Apr 10 18:42:47 2006
New Revision: 3275

Modified:
   stoqlib/trunk/stoqlib/domain/base.py

Log:
Dealing with connections properly in base domain classes


Modified: stoqlib/trunk/stoqlib/domain/base.py
==============================================================================
--- stoqlib/trunk/stoqlib/domain/base.py	(original)
+++ stoqlib/trunk/stoqlib/domain/base.py	Mon Apr 10 18:42:47 2006
@@ -213,8 +213,6 @@
         k = qual(iface)
         adapter = self._adapterCache.get(k)
         if adapter is not None:
-            if connection:
-                adapter._connection = connection
             return adapter
 
         adapterClass = self._facets.get(k)
@@ -347,9 +345,8 @@
         # should this be `implements' of some kind?
         if ((persist is None or persist)
             and hasattr(adaptable, '_getComponent')):
-            conn = adaptable.get_connection()
             adapter = adaptable._getComponent(self, registry,
-                                              connection=conn)
+                                              connection=connection)
         else:
             adapter = registry.getAdapter(adaptable, self, _NoImplementor,
                                           persist=persist)


More information about the POS-commit mailing list