Commit 80fa23e5 authored by Vincent Pelletier's avatar Vincent Pelletier

When 'here' is not set in the request, fallback on aq_parent of containing...

When 'here' is not set in the request, fallback on aq_parent of containing form. This allows to write clean code to render the listbox - ie without requiring toi edit the request.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9957 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3a3d77bd
......@@ -460,7 +460,8 @@ class ListBoxRenderer:
def getContext(self):
"""Return the context of rendering this ListBox.
"""
return self.request['here']
here = self.request.get('here')
return here is not None and here or self.getForm().aq_parent
getContext = VolatileCachingMethod(getContext)
......
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