Commit 19ff132f authored by Nicolas Dumazet's avatar Nicolas Dumazet

We left out workflow resets during our aq_reset to resetDynamicDocuments switch

in r43009. This was a mistake: add it again and explain why it's required.

This fixes the last 2 failures of testBase


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43097 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 190710d5
......@@ -37,7 +37,7 @@ from accessor_holder import _generateBaseAccessorHolder, _generatePreferenceTool
from Products.ERP5Type.mixin.temporary import TemporaryDocumentMixin
from Products.ERP5Type.Base import _aq_reset, Base
from Products.ERP5Type.Base import Base, resetRegisteredWorkflowMethod
from Products.ERP5Type.Globals import InitializeClass
from Products.ERP5Type.Utils import setDefaultClassProperties
from Products.ERP5Type import document_class_registry, mixin_class_registry
......@@ -494,6 +494,13 @@ def synchronizeDynamicModules(context, force=False):
finally:
Base.aq_method_lock.release()
# It's okay for classes to keep references to old methods - maybe.
# but we absolutely positively need to clear the workflow chains
# stored in WorkflowMethod objects: our generation of workflow
# methods adds/registers/wraps existing methods, but does not
# remove old chains. Do it now.
resetRegisteredWorkflowMethod()
# Some method generations are based on portal methods, and portal
# methods cache results. So it is safer to invalidate the cache.
cache_tool = getattr(context, 'portal_caches', None)
......
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