Commit ebd08a8d authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_cloud: Index also stop_requested like start_requested

This will prevent mistaken information when display the used amount of instances.
parent 04d4ef9c
...@@ -13,7 +13,7 @@ elif slap_state == 'busy': ...@@ -13,7 +13,7 @@ elif slap_state == 'busy':
validation_state="validated", validation_state="validated",
default_aggregate_uid=context.getUid(), default_aggregate_uid=context.getUid(),
) )
if (instance is None) or (instance.getSlapState() != "start_requested"): if (instance is None) or (instance.getSlapState() not in ["start_requested", "stop_requested"]):
return [] return []
else: else:
return [instance.getUrlString()] return [instance.getUrlString()]
......
...@@ -3,7 +3,7 @@ instance = context.getPortalObject().portal_catalog.getResultValue( ...@@ -3,7 +3,7 @@ instance = context.getPortalObject().portal_catalog.getResultValue(
validation_state="validated", validation_state="validated",
default_aggregate_uid=context.getUid(), default_aggregate_uid=context.getUid(),
) )
if (instance is None) or (instance.getSlapState() != "start_requested"): if (instance is None) or (instance.getSlapState() not in ["start_requested", "stop_requested"]):
return "" return ""
else: else:
return instance.getSourceReference() return instance.getSourceReference()
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