Commit 43d48390 authored by Łukasz Nowak's avatar Łukasz Nowak

Disallow updating destoryed instances.

parent 342e4460
......@@ -52,11 +52,15 @@
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
from Products.ZSQLCatalog.SQLCatalog import Query, ComplexQuery\n
\n
software_instance = state_change[\'object\']\n
portal = software_instance.getPortalObject()\n
\n
if software_instance.SoftwareInstance_getStatus() == \'Destroyed\':\n
raise ValidationFailed\n
\n
# avoid conflicting with "in progress" update tasks\n
tag_list = ["%s_destroyInProgress" % software_instance.getUid(), "%s_startInProgress" % software_instance.getUid()]\n
for tag in tag_list:\n
......
360
\ No newline at end of file
361
\ 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