Commit 5925759c authored by Sebastien Robin's avatar Sebastien Robin

Workflow cleanup: avoid errors when there is no action type

parent 6a8a8fb3
......@@ -86,10 +86,10 @@ class Transition(IdAsReferenceMixin("transition_", "prefix"), XMLObject,
security.declareProtected(Permissions.AccessContentsInformation,
'getActionType')
def getActionType(self):
prefix_length = len('action_type/')
action_type_list = [path[prefix_length:] for path in self.getCategoryList()
if path.startswith('action_type/')]
return action_type_list[0]
for path in self.getCategoryList():
if path.startswith('action_type/'):
return path[12:] # 12 is len('action_type/')
return None
security.declareProtected(Permissions.AccessContentsInformation,
'getBeforeScriptList')
......
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