[Zope-dev] FYI: A possible bug in manage_pasteObjects (submitted to the Collector)

Itamar Shtull-Trauring itamars@ibm.net
Mon, 22 Nov 1999 12:45:57 +0200


It looks like manage_afterClone should be called with the original object
passed to the function, but in fact manage_pasteObjects passes the cloned
object, which is rather pointless.

-------- Original Message --------
Date: Mon, 22 Nov 1999 12:22:05 +0200 (IST)
From: Noa Harvey <nharvey @ pob.huji.ac.il>

In lib/OFS/CopySupport.py
In the function manage_pasteObjects
the following line appears:

                ob=ob._getCopy(self)
                ob.manage_afterClone(ob)

Passing ob as an argument doesn't make sense
because the function is being called on ob,
(so self is already ob)
it would make more sense to to something along the lines of:
		original_ob=ob
                ob=ob._getCopy(self)
                ob.manage_afterClone(original_ob)

That way REQUEST and other useful information will be available when
overriding manage_afterClone.