Commit 8bc13f7e authored by Łukasz Nowak's avatar Łukasz Nowak

Fix migration script + provide fixing script.

parent c3518a55
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>context.getPortalObject().portal_catalog.searchAndActivate(\n
portal_type=\'Software Installation\',\n
validation_state=\'validated\',\n
method_id=\'SoftwareInstallation_fixMigration\'\n
)\n
\n
return \'Ignition started.\'\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Site_initiateSoftwareInstallationFixMigration</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -118,8 +118,8 @@ if current_software_installation is None:\n
current_packing_list_line.setAggregateList(aggregate_list)\n
current_resource = current_packing_list_line.getResource()\n
current_state = current_packing_list.getSimulationState()\n
if current_resource == software_cleanup_resource:\n
current_software_installation.requestDestroy(\'Requested destruction because of %s\' % current_packing_list.getPath())\n
if current_resource == software_cleanup_resource.getRelativeUrl():\n
current_software_installation.requestDestroy(comment=\'Requested destruction because of %s\' % current_packing_list.getPath())\n
if current_state == \'delivered\':\n
current_software_installation.invalidate(comment=\'Reported destruction because of %s\' % current_packing_list.getPath())\n
\n
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>assert context.getPortalType() == \'Software Installation\'\n
\n
delivery = context.getCausalityValue(portal_type=\'Purchase Packing List\')\n
\n
delivery_line = delivery.contentValues(portal_type=\'Purchase Packing List Line\')[0]\n
\n
if delivery_line.getResource() == \'service_module/vifib_software_cleanup\':\n
if context.getSlapState() == \'start_requested\':\n
context.requestDestroy(comment=\'Requested destruction because of %s\' % delivery.getPath())\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SoftwareInstallation_fixMigration</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
146
\ No newline at end of file
147
\ 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