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():
if found:
result = instance.SoftwareInstance_getConnectionParameterList(type)
result = instance.SoftwareInstance_getConnectionParameterList(type,
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'):
elif not type and k.endswith('_info'):
d = newTempDocument(portal, context.getRelativeUrl())
d = newTempDocument(portal, relative_url)
d.edit(connection_key=k, connection_value=connection_dict[k])
return return_list
......@@ -50,7 +50,7 @@
<key> <string>_params</string> </key>
<value> <string>type=None, **kwargs</string> </value>
<value> <string>type=None, relative_url=None, **kwargs</string> </value>
<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