Commit 72bf6a4a authored by Julien Muchembled's avatar Julien Muchembled

Fix bug in Shared.DC.ZRDB.TM that may hide a critical error.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26949 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b6f66161
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
# Load all monkey patches # Load all monkey patches
from Products.ERP5Type.patches import ObjectManager from Products.ERP5Type.patches import ObjectManager
from Products.ERP5Type.patches import PropertyManager from Products.ERP5Type.patches import PropertyManager
from Products.ERP5Type.patches import TM
from Products.ERP5Type.patches import DA from Products.ERP5Type.patches import DA
from Products.ERP5Type.patches import DCWorkflow from Products.ERP5Type.patches import DCWorkflow
from Products.ERP5Type.patches import BTreeFolder2 from Products.ERP5Type.patches import BTreeFolder2
......
##############################################################################
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
# Copyright (c) 2009 Nexedi SARL and Contributors. All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
##############################################################################
import transaction
from Shared.DC.ZRDB.TM import TM, Surrogate
# ZPublisher error path can aggravate error:
# https://bugs.launchpad.net/bugs/229863
def TM__register(self):
if not self._registered:
#try:
transaction.get().register(Surrogate(self))
self._begin()
self._registered = 1
self._finalize = 0
#except: pass
TM._register = TM__register
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment