[Zope-CVS] CVS: Products/AdaptableStorage/zodb - ASConnection.py:1.16
Shane Hathaway
shane@zope.com
Tue, 14 Jan 2003 12:46:48 -0500
Update of /cvs-repository/Products/AdaptableStorage/zodb
In directory cvs.zope.org:/tmp/cvs-serv7716/zodb
Modified Files:
ASConnection.py
Log Message:
Circumvented the ZODB trickery done in OFS.File. This fixes the bug
in uploading large files.
=== Products/AdaptableStorage/zodb/ASConnection.py 1.15 => 1.16 ===
--- Products/AdaptableStorage/zodb/ASConnection.py:1.15 Fri Jan 10 14:02:17 2003
+++ Products/AdaptableStorage/zodb/ASConnection.py Tue Jan 14 12:46:46 2003
@@ -377,6 +377,18 @@
raise
+ def register(self, object):
+ """Register an object with the appropriate transaction manager.
+ """
+ assert object._p_jar is self
+ if object._p_oid is not None:
+ get_transaction().register(object)
+ # else someone is trying to trick ZODB into registering an
+ # object with no OID. OFS.Image.File._read_data() does this.
+ # Since ASConnection really needs meaningful OIDs, just ignore
+ # the attempt.
+
+
def __repr__(self):
if self._version:
ver = ' (in version %s)' % `self._version`