def last_migrate_comments(self): """Migrate the plone.app.discussion comments. Comments were stored on the portal, get them and Copy the conversations from old to new object.""" portal = getToolByName(self.old, 'portal_url').getPortalObject() move_comments(portal, self.new)
def beforeChange_store_comments_on_portal(self): """Comments from plone.app.discussion are lost when the old object is renamed... We save the comments in a safe place...""" portal = getToolByName(self.old, 'portal_url').getPortalObject() move_comments(self.old, portal)