Commit ca2d4324 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_crm: Minor update on a search from the instance

parent bff27102
......@@ -4,8 +4,12 @@ hosting_subscription = support_request.getAggregateValue(portal_type="Hosting Su
if hosting_subscription is None:
return
instance = hosting_subscription.getPredecessorValue()
if instance is None or instance.getSlapState() == 'destroy_requested':
instance = None
for possible_instance in hosting_subscription.getPredecessorValueList():
if possible_instance.getSlapState() != 'destroy_requested':
instance = possible_instance
break
if instance is None:
return
parameter_dict = instance.getConnectionXmlAsDict()
......
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