Commit 748e758c authored by Jérome Perrin's avatar Jérome Perrin

only generate a new id in _get_id if the folder already contains an object...

only generate a new id in _get_id if the folder already contains an object with the id of the object we are about to paste.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5557 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent fdabcfdc
...@@ -298,6 +298,8 @@ be a problem).""" ...@@ -298,6 +298,8 @@ be a problem)."""
# Override Zope default by folder id generation # Override Zope default by folder id generation
def _get_id(self, id): def _get_id(self, id):
if self._getOb(id, None) is None :
return id
return self.generateNewId() return self.generateNewId()
#security.declareProtected( Permissions.DeletePortalContent, 'manage_delObjects' ) #security.declareProtected( Permissions.DeletePortalContent, 'manage_delObjects' )
......
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