[IMP] web_diagram: dict.update call, use kwargs instead of creating an immediately discarded dict in-place

bzr revid: xmo@openerp.com-20120110100103-h7gghm1lzg5h6a2l
This commit is contained in:
Xavier Morel 2012-01-10 11:01:03 +01:00
parent 15a39f92bb
commit 937fd7a14c
1 changed files with 8 additions and 8 deletions

View File

@ -64,13 +64,13 @@ class DiagramView(View):
for tr in data_connectors:
t = connectors.get(str(tr['id']))
t.update({
'source': tr[src_node][1],
'destination': tr[des_node][1],
'options': {},
'signal': tr['signal']
})
t = connectors[str(tr['id'])]
t.update(
source=tr[src_node][1],
destination=tr[des_node][1],
options={},
signal=tr.get('signal')
)
for i, fld in enumerate(connector_fields):
t['options'][connector_fields_string[i]] = tr[fld]
@ -87,7 +87,7 @@ class DiagramView(View):
if not n:
n = isolate_nodes.get(act['id'], {})
y_max += 140
n.update({'x': 20, 'y': y_max})
n.update(x=20, y=y_max)
nodes[act['id']] = n
n.update(