Commit 4064698c authored by Łukasz Nowak's avatar Łukasz Nowak

Avoid bang on destroyed instance.

Computer might not have access to it.
parent 9574074f
...@@ -57,6 +57,9 @@ for computer_partition in [x for x in computer.contentValues(portal_type=\'Compu ...@@ -57,6 +57,9 @@ for computer_partition in [x for x in computer.contentValues(portal_type=\'Compu
except ValueError:\n except ValueError:\n
# no need to bang trees without any delivery line\n # no need to bang trees without any delivery line\n
continue\n continue\n
if packing_list_line.getResource() == context.getPortalObject().portal_preferences.getPreferredInstanceCleanupResource() and \\\n
packing_list_line.getSimulationState() == \'delivered\':\n
continue\n
software_instance = packing_list_line.getAggregateValue(portal_type=\'Software Instance\')\n software_instance = packing_list_line.getAggregateValue(portal_type=\'Software Instance\')\n
software_instance.activate().SoftwareInstance_bangAsSelf(relative_url=software_instance.getRelativeUrl(),\n software_instance.activate().SoftwareInstance_bangAsSelf(relative_url=software_instance.getRelativeUrl(),\n
reference=software_instance.getReference(), comment=state_change.kwargs.get(\'comment\', \'\'))\n reference=software_instance.getReference(), comment=state_change.kwargs.get(\'comment\', \'\'))\n
......
709 710
\ No newline at end of file \ No newline at end of file
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