Skip to content

Commit

Permalink
- fix a longstanding error traversing into views from page templates
Browse files Browse the repository at this point in the history
  • Loading branch information
dataflake committed Apr 28, 2019
1 parent cd6e497 commit 9f03dc1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Shared/DC/Scripts/Bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from Acquisition import aq_base
from Acquisition import aq_inner
from Acquisition import aq_parent
from zope.component import queryMultiAdapter as qma


defaultBindings = {'name_context': 'context',
Expand Down Expand Up @@ -246,7 +247,8 @@ def __before_publishing_traverse__(self, self2, request):
path = request['TraversalRequestNameStack']
names = self.getBindingAssignments()
if not names.isNameAssigned('name_subpath') or \
(path and hasattr(aq_base(self), path[-1])):
(path and hasattr(aq_base(self), path[-1])) or \
(path and qma((self, request), name=path[-1]) is not None):
return
subpath = path[:]
path[:] = []
Expand Down

0 comments on commit 9f03dc1

Please sign in to comment.