Commit 0027659a authored by Sebastien Robin's avatar Sebastien Robin

use ActivityPendingError when we rename object while some activities are pending

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12488 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 81d87ef6
...@@ -27,6 +27,7 @@ from Globals import PersistentMapping, MessageDialog ...@@ -27,6 +27,7 @@ from Globals import PersistentMapping, MessageDialog
from Products.ERP5Type.Utils import get_request from Products.ERP5Type.Utils import get_request
from Products.CMFCore.WorkflowCore import WorkflowException from Products.CMFCore.WorkflowCore import WorkflowException
from Products.CMFCore.CatalogTool import CatalogTool as CMFCoreCatalogTool from Products.CMFCore.CatalogTool import CatalogTool as CMFCoreCatalogTool
from Products.CMFActivity.Errors import ActivityPendingError
from zLOG import LOG from zLOG import LOG
...@@ -134,7 +135,8 @@ class CopyContainer: ...@@ -134,7 +135,8 @@ class CopyContainer:
portal_activities = None portal_activities = None
if portal_activities is not 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 ActivityPendingError, 'Sorry, pending activities prevent ' \
+ 'changing id at this current stage'
# Search for categories that have to be updated in sub objects. # Search for categories that have to be updated in sub objects.
self._recursiveSetActivityAfterTag(ob) 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