Commit ea19a24c authored by Jérome Perrin's avatar Jérome Perrin

Remove silent try/except on ActiveObject.hasActivity.

According to the comment, this is for the case where portal_activities is not
created, but this case is tested before, so there's no exception to expect
here.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25335 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f3ca93f0
......@@ -158,15 +158,9 @@ class ActiveObject(ExtensionClass.Base):
"""Tells if there is pending activities for this object.
"""
activity_tool = getToolByName(self, 'portal_activities', None)
if activity_tool is None: return 0 # Do nothing if no portal_activities
try:
if activity_tool is None:
return 0 # Do nothing if no portal_activities
return activity_tool.hasActivity(self, **kw)
except ConflictError:
raise
except:
# If the portal_activities were not created
# there can not be any activity
return 0
security.declareProtected( permissions.View, 'hasErrorActivity' )
def hasErrorActivity(self, **kw):
......
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