Commit 6f77913b authored by iv's avatar iv

ERP5Workflow: getSomeCategoryList should return the full paths to the category

parent ff13da35
...@@ -123,8 +123,8 @@ class Interaction(IdAsReferenceMixin('interaction_', "prefix"), XMLObject, ...@@ -123,8 +123,8 @@ class Interaction(IdAsReferenceMixin('interaction_', "prefix"), XMLObject,
""" """
returns the list of activate script returns the list of activate script
""" """
return [path.split('/')[-1] for path in self.getCategoryList() return [path for path in self.getCategoryList()
if path.startswith('activate_script')] if path.startswith('activate_script/')]
# XXX(PERF): hack to see Category Tool responsability in new workflow slowness # XXX(PERF): hack to see Category Tool responsability in new workflow slowness
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
...@@ -133,5 +133,5 @@ class Interaction(IdAsReferenceMixin('interaction_', "prefix"), XMLObject, ...@@ -133,5 +133,5 @@ class Interaction(IdAsReferenceMixin('interaction_', "prefix"), XMLObject,
""" """
returns the list of before commit script returns the list of before commit script
""" """
return [path.split('/')[-1] for path in self.getCategoryList() return [path for path in self.getCategoryList()
if path.startswith('before_commit_script')] if path.startswith('before_commit_script/')]
\ No newline at end of file
...@@ -100,7 +100,8 @@ class State(IdAsReferenceMixin("state_", "prefix"), XMLObject, CustomStorageMatr ...@@ -100,7 +100,8 @@ class State(IdAsReferenceMixin("state_", "prefix"), XMLObject, CustomStorageMatr
instead of getting all the transition objects from the destination list instead of getting all the transition objects from the destination list
to then use their ids, extract the information from the string to then use their ids, extract the information from the string
""" """
return [path.split('/')[-1] for path in self.getCategoryList() if path.startswith('destination')] return [path for path in self.getCategoryList()
if path.startswith('destination/')]
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
......
...@@ -90,8 +90,8 @@ class Transition(IdAsReferenceMixin("transition_", "prefix"), XMLObject, ...@@ -90,8 +90,8 @@ class Transition(IdAsReferenceMixin("transition_", "prefix"), XMLObject,
""" """
returns the list of before script returns the list of before script
""" """
return [path.split('/')[-1] for path in self.getCategoryList() return [path for path in self.getCategoryList()
if path.startswith('before_script')] if path.startswith('before_script/')]
# XXX(PERF): hack to see Category Tool responsability in new workflow slowness # XXX(PERF): hack to see Category Tool responsability in new workflow slowness
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
...@@ -100,8 +100,8 @@ class Transition(IdAsReferenceMixin("transition_", "prefix"), XMLObject, ...@@ -100,8 +100,8 @@ class Transition(IdAsReferenceMixin("transition_", "prefix"), XMLObject,
""" """
returns the list of after script returns the list of after script
""" """
return [path.split('/')[-1] for path in self.getCategoryList() return [path for path in self.getCategoryList()
if path.startswith('after_script')] if path.startswith('after_script/')]
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
......
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