Commit 68568314 authored by Łukasz Nowak's avatar Łukasz Nowak

Simplify the call.

requestSoftwareInstance requires much less arguments.
parent ad8ef8a9
...@@ -79,20 +79,13 @@ class InstancePublisher(GenericPublisher): ...@@ -79,20 +79,13 @@ class InstancePublisher(GenericPublisher):
portal = self.getPortalObject() portal = self.getPortalObject()
person = portal.ERP5Site_getAuthenticatedMemberPersonValue() person = portal.ERP5Site_getAuthenticatedMemberPersonValue()
instance = portal.portal_catalog.getResultValue(
portal_type=['Software Instance', 'Slave Instance'],
reference=instance_id)
if instance is None:
response.setStatus(404)
return response
delivery_line = instance.Item_getInstancePackingListLine()
person.requestSoftwareInstance( person.requestSoftwareInstance(
software_release=delivery_line.getAggregateValue( software_release='',
portal_type='Software Release').getUrlString(), software_title=instance_id,
software_title=instance.getTitle(), software_type='',
shared=instance.getPortalType() == 'Slave Instance', shared='',
instance_xml=instance.getTextContent(), instance_xml='',
sla_xml=instance.getSlaXml(), sla_xml='',
state='destroyed' state='destroyed'
) )
response.setStatus(202) response.setStatus(202)
......
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