[Erp5-report] r16101 - /erp5/trunk/products/ERP5Type/Base.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Sep 6 10:05:28 CEST 2007
Author: yusei
Date: Thu Sep 6 10:05:27 2007
New Revision: 16101
URL: http://svn.erp5.org?rev=16101&view=rev
Log:
When cannot acquire workflow tool from instance, just to call original method and return.
Modified:
erp5/trunk/products/ERP5Type/Base.py
Modified: erp5/trunk/products/ERP5Type/Base.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Base.py?rev=16101&r1=16100&r2=16101&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Base.py (original)
+++ erp5/trunk/products/ERP5Type/Base.py Thu Sep 6 10:05:27 2007
@@ -131,11 +131,16 @@
# critical sections in this part of the code and a
# thread variable which tells in which semantic context the code
# should ne executed. - XXX
- return apply(self._m, (instance,) + args, kw)
+ return self._m(instance, *args, **kw)
# New implementation does not use any longer wrapWorkflowMethod
# but directly calls the workflow methods
wf = getToolByName(instance, 'portal_workflow', None)
+
+ if wf is None:
+ # XXX instance is unwrapped(no acquisition)
+ # XXX I must think that what is a correct behavior.(Yusei)
+ return self._m(instance, *args, **kw)
# Build a list of transitions which may need to be invoked
instance_path = instance.getPhysicalPath()
More information about the Erp5-report
mailing list