Commit 4af4f361 authored by Vincent Pelletier's avatar Vincent Pelletier

CopySupport: Do not call manage_afterClone when "duplicate" is true.

manage_afterClone clears workflow history, which is precisely what
"duplicate" is trying to avoid.
This fixes a regression introduced in
  commit 7e810d5a
  Author: Vincent Pelletier <vincent@nexedi.com>
  Date:   Tue Feb 20 17:06:46 2018 +0900

      CopySupport: Factorise clipboard-related methods and code paths.
parent ae4000c2
......@@ -502,10 +502,11 @@ class CopyContainer:
new_ob = self._getOb(new_id)
new_ob._postCopy(self, op=op)
if is_clone:
new_ob.manage_afterClone(new_ob)
if duplicate:
new_ob._postDuplicate()
else:
new_ob.manage_afterClone(new_ob)
new_ob.wl_clearLocks()
if duplicate:
new_ob._postDuplicate()
if not set_owner:
# try to make ownership implicit if possible
new_ob.manage_changeOwnershipType(explicit=0)
......
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