Commit 2ba193ab authored by Jérome Perrin's avatar Jérome Perrin

updateRelatedContent must be called on the moved object, not the

container.

fix missing imports.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7619 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c984cb3c
...@@ -18,10 +18,9 @@ from AccessControl.Permission import Permission ...@@ -18,10 +18,9 @@ from AccessControl.Permission import Permission
from OFS.ObjectManager import ObjectManager from OFS.ObjectManager import ObjectManager
from OFS.CopySupport import CopyContainer as OriginalCopyContainer from OFS.CopySupport import CopyContainer as OriginalCopyContainer
from OFS.CopySupport import CopyError from OFS.CopySupport import CopyError
from OFS.CopySupport import eNotSupported from OFS.CopySupport import eNotSupported, eNoItemsSpecified
from OFS.CopySupport import _cb_encode, _cb_decode, cookie_path, absattr from OFS.CopySupport import _cb_encode, _cb_decode, cookie_path
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from Products.CMFCore.CMFCatalogAware import CMFCatalogAware
from Acquisition import aq_base from Acquisition import aq_base
from Products.CMFCore.utils import getToolByName from Products.CMFCore.utils import getToolByName
from Globals import PersistentMapping, MessageDialog from Globals import PersistentMapping, MessageDialog
...@@ -334,10 +333,10 @@ class CopyContainer: ...@@ -334,10 +333,10 @@ class CopyContainer:
if op == 1: if op == 1:
old_url = getattr(self, '_v_category_url_before_move', None) old_url = getattr(self, '_v_category_url_before_move', None)
if old_url is not None: if old_url is not None:
container.activate().updateRelatedContent( self.activate().updateRelatedContent(
old_url, old_url,
self.getRelativeUrl()) self.getRelativeUrl())
#### Helper methods #### Helper methods
......
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