Skip to content

Commit

Permalink
Do not assume that you can iterate over a publishable object
Browse files Browse the repository at this point in the history
  • Loading branch information
do3cc committed Jul 12, 2012
1 parent ab6b694 commit dc96ef2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions doc/CHANGES.rst
Expand Up @@ -14,6 +14,8 @@ http://docs.zope.org/zope2/releases/.

- AccessControl = 2.13.8

- ZPublisher: Do not assume that you can iterate over a publishable object

2.13.15 (2012-06-22)
--------------------

Expand Down
3 changes: 2 additions & 1 deletion src/ZPublisher/BaseRequest.py
Expand Up @@ -541,7 +541,8 @@ def traverse(self, path, response=None, validated_hook=None):
hasattr(parents[1], 'aq_base') and
not hasattr(parents[1],'__bobo_traverse__')):
base = parents[1].aq_base
if not (hasattr(base, entry_name) or entry_name in base):
if not (hasattr(base, entry_name) or
(hasattr(entry_name, '__iter__') and entry_name in base)):
raise AttributeError(entry_name)

# After traversal post traversal hooks aren't available anymore
Expand Down

0 comments on commit dc96ef2

Please sign in to comment.