Commit b8d323f5 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin Committed by Cédric Le Ninivin

slapos_jio_api_style: request Software Instance return Software instance if it exists

parent e320efef
...@@ -89,13 +89,9 @@ try: ...@@ -89,13 +89,9 @@ try:
.getRelativeUrl() .getRelativeUrl()
requester.setLastData(value, key=key) requester.setLastData(value, key=key)
if requested_software_instance is None: if requested_software_instance is not None:
raise SoftwareInstanceNotReady return requested_software_instance.asJSONText()
else: raise SoftwareInstanceNotReady
if not requested_software_instance.getAggregate(portal_type="Compute Partition"):
raise SoftwareInstanceNotReady
else:
return requested_software_instance.asJSONText()
except SoftwareInstanceNotReady: except SoftwareInstanceNotReady:
return logError( return logError(
"Software Instance Not Ready", "Software Instance Not Ready",
......
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