[Erp5-report] r42899 nicolas.dumazet - /erp5/trunk/products/ERP5Type/Base.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Feb 1 17:00:20 CET 2011


Author: nicolas.dumazet
Date: Tue Feb  1 17:00:20 2011
New Revision: 42899

URL: http://svn.erp5.org?rev=42899&view=rev
Log:
small cleanups

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=42899&r1=42898&r2=42899&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Base.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Base.py [utf8] Tue Feb  1 17:00:20 2011
@@ -169,7 +169,7 @@ class WorkflowMethod(Method):
     # New implementation does not use any longer wrapWorkflowMethod
     # but directly calls the workflow methods
     try:
-      wf = getToolByName(instance.getPortalObject(), 'portal_workflow')
+      wf = getattr(instance.getPortalObject(), 'portal_workflow')
     except AttributeError:
       # XXX instance is unwrapped(no acquisition)
       # XXX I must think that what is a correct behavior.(Yusei)
@@ -179,10 +179,10 @@ class WorkflowMethod(Method):
     instance_path = instance.getPhysicalPath()
     portal_type = instance.portal_type
     transactional_variable = getTransactionalVariable()
-    invoke_once_item_list = self._invoke_once.get(portal_type, {}).items()
+    invoke_once_dict = self._invoke_once.get(portal_type, {})
     valid_invoke_once_item_list = []
     # Only keep those transitions which were never invoked
-    for wf_id, transition_list in invoke_once_item_list:
+    for wf_id, transition_list in invoke_once_dict.iteritems():
       valid_transition_list = []
       for transition_id in transition_list:
         once_transition_key = ('Products.ERP5Type.Base.WorkflowMethod.__call__',



More information about the Erp5-report mailing list