Commit 4df390a1 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

change key in VirtualFolderMixin to fix install of business template

in case a container is a WebSite, container._getOb("id") can return any object
with id "id". If object returned is not inside container, later
container.manage_delObjects([object_id]) will fail with KeyError.
parent 680358dd
......@@ -65,7 +65,7 @@ class VirtualFolderMixin:
XXX
"""
tv = getTransactionalVariable()
key = (id, )
key = 'VirtualFolderMixin', self.getPhysicalPath(), id
tv[key] = ob.__of__(self).getRelativeUrl()
method = getattr(self, 'Base_setObject', None)
......@@ -80,7 +80,8 @@ class VirtualFolderMixin:
XXX
"""
tv = getTransactionalVariable()
document_url = tv.get((id,), None)
key = 'VirtualFolderMixin', self.getPhysicalPath(), id
document_url = tv.get(key, None)
if document_url is not None:
return self.getPortalObject().unrestrictedTraverse(document_url)
......
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