All, If I make changes to an object through the management interface then undo details get added to the undo list. Let's say that I delete an object. If I though delete an object through calling manage_delObjects(ids=<somelist>) then the undo info is not saved. Am I missing something, do I have to call something else, is this just not possible? tia Phil phil.harris@zope.co.uk
Phil Harris wrote:
If I though delete an object through calling manage_delObjects(ids=<somelist>) then the undo info is not saved.
I'm guessing you have a script that deletes several objects like this and and onyl the script name is appearing in the undo log? If so, try changing it to be like this: get_transaction().begin() manage_delObjects(ids=somelist) get_transaction().note('Deleted %s' % string.join(somelist)) get_transaction().commit() Of course, if you want to be able to undo the deletion of each object, then you'll want: for id in somelist: get_transaction().begin() manage_delObjects(ids=[id]) get_transaction().note('Deleted %s' % id) get_transaction().commit() HTH, Chris
Am I missing something, do I have to call something else, is this just not possible?
tia
Phil phil.harris@zope.co.uk
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (2)
-
Chris Withers -
Phil Harris