Commit a04c4246 authored by Sebastien Robin's avatar Sebastien Robin

improvement of workflow history management with portal_repository


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1129 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e8b27794
...@@ -991,8 +991,21 @@ class ERP5Conduit(XMLSyncUtilsMixin): ...@@ -991,8 +991,21 @@ class ERP5Conduit(XMLSyncUtilsMixin):
if add_action and not simulate: if add_action and not simulate:
LOG('addNode, setting status:',0,'ok') LOG('addNode, setting status:',0,'ok')
wf_tool.setStatusOf(wf_id,object,status) wf_tool.setStatusOf(wf_id,object,status)
#else:
# return wf_conflict_list # Specific CPS, try to remove duplicate lines in portal_repository._histories
tool = getToolByName(self,'portal_repostiry',None)
if tool is not None:
if hasattr(self,'getDocid'):
docid = self.getDocid()
history = tool.getHistory(docid)
new_history = ()
for history_line in history:
if history_line not in new_history:
new_history += (history_line,)
tool.setHistory(docid,new_history)
return conflict_list return conflict_list
security.declareProtected(Permissions.ModifyPortalContent, 'addLocalRoleNode') security.declareProtected(Permissions.ModifyPortalContent, 'addLocalRoleNode')
......
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