Commit 24895d97 authored by Jérome Perrin's avatar Jérome Perrin

cleanups

parent 9f6ecc2e
......@@ -54,7 +54,6 @@
import json\n
portal = context.getPortalObject()\n
\n
#context.manage_delProperties([\'jsplumb_graph\'])\n
# if a graph has been saved, we use this info for node coordinates.\n
position_graph = context.getProperty(\'jsplumb_graph\')\n
if position_graph:\n
......
......@@ -24,7 +24,7 @@
/* ===========================================================================\n
* Copyright 2013 Nexedi SA and Contributors\n
* \n
*\n
* This file is part of DREAM.\n
*\n
* DREAM is free software: you can redistribute it and/or modify\n
......
......@@ -54,19 +54,18 @@
business_process = sci[\'object\']\n
graph = business_process.getProperty(\'jsplumb_graph\')\n
\n
trade_state_dict = dict(start=None, end=None)\n
for trade_state in business_process.getPortalObject().portal_categories.trade_state.getCategoryChildValueList():\n
# XXX I hope no duplicates\n
trade_state_dict[trade_state.getReference() or trade_state.getId()] = trade_state\n
\n
from pprint import pformat\n
\n
if graph:\n
trade_state_dict = dict(start=None, end=None)\n
for trade_state in business_process.getPortalObject().portal_categories.trade_state.getCategoryChildValueList():\n
# XXX I hope no duplicates\n
trade_state_dict[trade_state.getReference() or trade_state.getId()] = trade_state\n
\n
graph = json.loads(graph)[\'graph\']\n
\n
for edge_id, edge_data in graph[\'edge\'].items():\n
for edge_data in graph[\'edge\'].values():\n
# Create the business link if it does not exist yet.\n
if not edge_data.get(\'business_process_relative_url\'):\n
if not edge_data.get(\'business_link_url\'):\n
business_process.newContent(\n
portal_type=\'Business Link\',\n
predecessor_value=trade_state_dict[edge_data[\'source\']],\n
......@@ -74,8 +73,6 @@ if graph:\n
title=edge_data.get(\'name\'),\n
trade_phase=edge_data.get(\'trade_phase\'),\n
)\n
\n
if not graph: bam\n
</string> </value>
</item>
<item>
......
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