Commit 3c951bd5 authored by iv's avatar iv

ERP5Workflow: use dict comprehension instead of traditional for loop

parent 1e22fa09
...@@ -763,9 +763,10 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject, CacheCookieMixin): ...@@ -763,9 +763,10 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject, CacheCookieMixin):
tdef_exprs = {} tdef_exprs = {}
transition_variable_list = [] transition_variable_list = []
if tdef is not None: if tdef is not None:
transition_variable_list = tdef.objectValues(portal_type='Transition Variable') tdef_exprs = {
for transition_variable in transition_variable_list: transition_variable.getCausalityId(): transition_variable.getVariableExpression()
tdef_exprs[transition_variable.getCausalityId()] = transition_variable.getVariableExpression() for transition_variable in tdef.objectValues(portal_type='Transition Variable')
}
# Update all transition variables # Update all transition variables
if form_kw is not None: if form_kw is not 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