Commit 60ea2776 authored by Romain Courteaud's avatar Romain Courteaud

slapos_pdm: non validated allocation supply do not impact the software installation deletion

parent fac83d69
......@@ -43,9 +43,8 @@ for allocation_cell in portal.portal_catalog(
resource__uid=software_product.getUid(),
software_release__uid=software_release.getUid()
):
if allocation_cell.isAllocable():
if allocation_cell.isAllocable() and (allocation_cell.getValidationState() == 'validated'):
return
# XXX check validation state
partition = portal.portal_catalog.getResultValue(
portal_type='Compute Partition',
......
......@@ -109,5 +109,5 @@ class TestSlapOSDestroySoftwareInstallation(SlapOSTestCaseMixin):
self.tic()
software_installation.SoftwareInstallation_destroyIfUnused()
self.assertEqual('start_requested', software_installation.getSlapState())
self.assertEqual('destroy_requested', software_installation.getSlapState())
self.assertEqual('validated', software_installation.getValidationState())
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