Commit c23f69d5 authored by Łukasz Nowak's avatar Łukasz Nowak

Remove key and certificate later.

Thanks to this it is possible to manipulate not finished (not delivered yet)
packing lists during destruction process.
parent c150c736
......@@ -50,7 +50,15 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string># revoke certificate\n
<value> <string># deliver proper packing list\n
packing_list_line = context.SoftwareInstance_getInstanceDestroyPackingListLine(state_change)\n
packing_list = packing_list_line.getParentValue()\n
if packing_list.getPortalObject().portal_workflow.isTransitionPossible(packing_list, \'start\'):\n
packing_list.start()\n
if packing_list.getPortalObject().portal_workflow.isTransitionPossible(packing_list, \'deliver\'):\n
packing_list.deliver()\n
\n
# revoke certificate\n
software_instance = state_change[\'object\']\n
try:\n
context.getPortalObject().portal_certificate_authority\\\n
......@@ -66,14 +74,6 @@ software_instance.edit(\n
ssl_key=None,\n
ssl_certificate=None,\n
)\n
\n
# deliver proper packing list\n
packing_list_line = context.SoftwareInstance_getInstanceDestroyPackingListLine(state_change)\n
packing_list = packing_list_line.getParentValue()\n
if packing_list.getPortalObject().portal_workflow.isTransitionPossible(packing_list, \'start\'):\n
packing_list.start()\n
if packing_list.getPortalObject().portal_workflow.isTransitionPossible(packing_list, \'deliver\'):\n
packing_list.deliver()\n
</string> </value>
</item>
<item>
......
256
\ No newline at end of file
257
\ 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