Commit e0169de7 authored by Vincent Pelletier's avatar Vincent Pelletier

Make __getattr__ find objects when the object id is given. Previous code would...

Make __getattr__ find objects when the object id is given. Previous code would have returned an OOBTree object when the ID of the htree subtree was given, and both are internale-only values.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16605 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5e707f5d
...@@ -582,7 +582,7 @@ class HBTreeFolder2Base (Persistent): ...@@ -582,7 +582,7 @@ class HBTreeFolder2Base (Persistent):
# to subitems, and __bobo_traverse__ hooks don't work with # to subitems, and __bobo_traverse__ hooks don't work with
# restrictedTraverse() unless __getattr__() is also present. # restrictedTraverse() unless __getattr__() is also present.
# Oh well. # Oh well.
res = self._htree.get(name) res = self._getOb(name, None)
if res is None: if res is None:
raise AttributeError, name raise AttributeError, name
return res return res
......
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