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