Skip to content

Commit

Permalink
Yo dawg, I put a wrapper in your wrapper so you can unwrap while you …
Browse files Browse the repository at this point in the history
…unwrap
  • Loading branch information
davisagli committed Nov 14, 2017
1 parent e6aca05 commit c199b33
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/plone/app/folder/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ def __init__(self, ob):
def __getattr__(self, name):
if name == '__replaceable__':
return REPLACEABLE
return getattr(self.__ob, name)
ob = object.__getattribute__(self, '_ReplaceableWrapper__ob')
return getattr(ob, name)

def __repr__(self):
return repr(aq_base(self.__ob))
return repr(object.__getattribute__(self, '_ReplaceableWrapper__ob'))


@implementer(IOrderedContainer)
Expand Down Expand Up @@ -82,7 +83,7 @@ def index_html(self, REQUEST=None, RESPONSE=None):
# Acquire from parent
parent = aq_parent(aq_inner(self))
target = parent.aq_acquire('index_html')
return ReplaceableWrapper(aq_base(target)).__of__(parent).__of__(self)
return ReplaceableWrapper(target).__of__(parent).__of__(self)

index_html = ComputedAttribute(index_html, 1)

Expand Down

0 comments on commit c199b33

Please sign in to comment.