BaseRequest.traverse doesn't handle __bobo_traverse__ correctly
Bug #143022 reported by
Joachim Werner
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope 2 |
Invalid
|
Medium
|
Unassigned |
Bug Description
The books say that if __bobo_traverse__ doesn't find an object to return it should return None. But the code in the traverse method of BaseRequest in ZPublisher/
The issue is that if __bobo_traverse__ returns None the "normal" traversal is skipped. If the object that we are looking for does not exist we then get a "missing docstring" error instead of the NotFound error we'd expect. This is because a None object has no docstring ...
Attached is a patch for 2.7.1b1. This patch seems to work, but is highly unelegant.
tags: | added: bugday20100519 |
tags: |
added: bugday removed: bug+solution bugday20100519 zope |
Changed in zope2: | |
status: | New → Triaged |
tags: | added: traversal |
To post a comment you must log in.
The zope2 project on Launchpad has been archived at the request of the Zope developers (see https:/ /answers. launchpad. net/launchpad/ +question/ 683589 and https:/ /answers. launchpad. net/launchpad/ +question/ 685285). If this bug is still relevant, please refile it at https:/ /github. com/zopefoundat ion/zope2.