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,7 +127,12 @@ class CopyContainer: ...@@ -127,7 +127,12 @@ class CopyContainer:
""" """
ob=self.restrictedTraverse(id) ob=self.restrictedTraverse(id)
# Make sure there is no activities pending on that object # Make sure there is no activities pending on that object
try:
portal_activities = getToolByName(self, 'portal_activities') 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: if portal_activities.countMessage(path=ob.getPath())>0:
raise ValueError, 'Sorry, some message are pending' raise ValueError, 'Sorry, some message are pending'
......
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