Commit bdd33aef authored by Sebastien Robin's avatar Sebastien Robin

make the manage_renameObject method working even if the activity tool is not installed

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11431 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 271e17e5
......@@ -127,9 +127,14 @@ class CopyContainer:
"""
ob=self.restrictedTraverse(id)
# Make sure there is no activities pending on that object
portal_activities = getToolByName(self, 'portal_activities')
if portal_activities.countMessage(path=ob.getPath())>0:
raise ValueError, 'Sorry, some message are pending'
try:
portal_activities = getToolByName(self, 'portal_activities')
except AttributeError:
# There is no activity tool
portal_activities = None
if portal_activities is not None:
if portal_activities.countMessage(path=ob.getPath())>0:
raise ValueError, 'Sorry, some message are pending'
# Search for categories that have to be updated in sub objects.
self._recursiveSetActivityAfterTag(ob)
......
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