Commit 401643fb authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Use appropriate relative_url on temporary objects

This prevents be redirected to another object when you click on the document.
parent 1ce019c9
......@@ -7,6 +7,7 @@ for instance in context.getPredecessorValueList():
break
if found:
result = instance.SoftwareInstance_getConnectionParameterList(type)
result = instance.SoftwareInstance_getConnectionParameterList(type,
relative_url=context.getRelativeUrl())
return result
......@@ -10,12 +10,15 @@ if connection_dict is None:
return return_list
portal = context.getPortalObject()
if relative_url == None:
relative_url = context.getRelativeUrl()
for k in sorted(connection_dict):
if type == 'info' and not k.endswith('_info'):
continue
elif not type and k.endswith('_info'):
continue
d = newTempDocument(portal, context.getRelativeUrl())
d = newTempDocument(portal, relative_url)
d.edit(connection_key=k, connection_value=connection_dict[k])
return_list.append(d)
return return_list
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>type=None, **kwargs</string> </value>
<value> <string>type=None, relative_url=None, **kwargs</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
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