Commit 1133c7ac authored by Jérome Perrin's avatar Jérome Perrin

upgrader: support the case where a portal type has been removed but still...

upgrader: support the case where a portal type has been removed but still referenced in workflow chains
parent 751ff56f
......@@ -97,10 +97,7 @@ new_workflow_chain_dict = {\'chain_%s\' % portal_type : \',\'.join(chain) \\\n
for portal_type, chain in workflow_chain_by_portal_type_dict.iteritems()}\n
\n
for portal_type, workflow_chain in portal_type_dict.iteritems():\n
try:\n
workflow_chain_list = list(workflow_chain_by_portal_type_dict[portal_type])\n
except:\n
return workflow_chain_by_portal_type_dict[portal_type]\n
workflow_chain_list = list(workflow_chain_by_portal_type_dict.get(portal_type, []))\n
expected_workflow_chain = sorted(workflow_chain)\n
if sorted(workflow_chain_list) != expected_workflow_chain:\n
error_list.append("%s - Expected: %s <> Found: %s" % (portal_type, \', \'.join(workflow_chain), \', \'.join(workflow_chain_list)))\n
......
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