Commit fa19c362 authored by Vincent Pelletier's avatar Vincent Pelletier

Change the way which is used to get the current URL. This fixes errors when...

Change the way which is used to get the current URL. This fixes errors when there are method ids at the end of the current url and that url gets used as a redirection url.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11983 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent fb03ad19
...@@ -497,9 +497,14 @@ class ListBoxRenderer: ...@@ -497,9 +497,14 @@ class ListBoxRenderer:
getFieldErrorDict = VolatileCachingMethod(getFieldErrorDict) getFieldErrorDict = VolatileCachingMethod(getFieldErrorDict)
def getUrl(self): def getUrl(self):
"""Return a requested URL.
""" """
return self.request.URL Return a requested URL.
Generate the URL from context and request because self.request['URL']
might contain a function name, which would make all redirections call
the function - which both we don't want and will probably crash.
"""
return '%s/%s' % (self.getContext().absolute_url(),
self.request.other.get('current_form_id', 'view'))
getUrl = VolatileCachingMethod(getUrl) getUrl = VolatileCachingMethod(getUrl)
......
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