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