Commit edab2287 authored by Nicolas Dumazet's avatar Nicolas Dumazet

small cleanups


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42899 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f838e0df
...@@ -169,7 +169,7 @@ class WorkflowMethod(Method): ...@@ -169,7 +169,7 @@ class WorkflowMethod(Method):
# New implementation does not use any longer wrapWorkflowMethod # New implementation does not use any longer wrapWorkflowMethod
# but directly calls the workflow methods # but directly calls the workflow methods
try: try:
wf = getToolByName(instance.getPortalObject(), 'portal_workflow') wf = getattr(instance.getPortalObject(), 'portal_workflow')
except AttributeError: except AttributeError:
# XXX instance is unwrapped(no acquisition) # XXX instance is unwrapped(no acquisition)
# XXX I must think that what is a correct behavior.(Yusei) # XXX I must think that what is a correct behavior.(Yusei)
...@@ -179,10 +179,10 @@ class WorkflowMethod(Method): ...@@ -179,10 +179,10 @@ class WorkflowMethod(Method):
instance_path = instance.getPhysicalPath() instance_path = instance.getPhysicalPath()
portal_type = instance.portal_type portal_type = instance.portal_type
transactional_variable = getTransactionalVariable() 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 = [] valid_invoke_once_item_list = []
# Only keep those transitions which were never invoked # 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 = [] valid_transition_list = []
for transition_id in transition_list: for transition_id in transition_list:
once_transition_key = ('Products.ERP5Type.Base.WorkflowMethod.__call__', once_transition_key = ('Products.ERP5Type.Base.WorkflowMethod.__call__',
......
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