Commit 6b4a8113 authored by Jérome Perrin's avatar Jérome Perrin

relation field: fix error when displayed along with a matrixbox

parent 5c480b0b
......@@ -413,7 +413,14 @@ $(document).ready(function() {
Render link to the related object.
"""
html_string = ''
here = REQUEST.get('cell', self._getContextValue(field, REQUEST))
here = self._getContextValue(field, REQUEST)
# If we this relation field is used as a listbox/matrixbox editable
# field, then the context of this cell is set in REQUEST. XXX this is not
# 100% reliable way, maybe we need something to know that the field is
# beeing rendered as an editable field.
cell = REQUEST.get('cell')
if cell is not None:
here = cell
portal_url = here.getPortalObject().portal_url
portal_url_string = portal_url()
if (value not in ((), [], None, '')) and \
......
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