Commit cf4a00c2 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

Register beforeTraverse hook if missing in editing a Web Site.

parent 5220990d
......@@ -264,3 +264,10 @@ class WebSite(WebSection):
return section_list
else:
return []
def _edit(self, **kw):
# migrate beforeTraverse hook if missing
if getattr(self, '__before_traverse__', None) is None and self.getPortalType() == 'Web Site':
handle = self.meta_type + '/' + self.getId()
BeforeTraverse.registerBeforeTraverse(self, WebSiteTraversalHook(), handle)
super(WebSite, self)._edit(**kw)
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