Commit 1562cfe6 authored by Jérome Perrin's avatar Jérome Perrin

graph_editor: sort json for deterministic output

parent df7dc0eb
......@@ -74,4 +74,7 @@ class_definition = {
}
}
return json.dumps(dict(graph=getBusinessProcessGraph(context), class_definition=class_definition), indent=2)
return json.dumps(
dict(graph=getBusinessProcessGraph(context), class_definition=class_definition),
sort_keys=True,
indent=2)
......@@ -89,4 +89,7 @@ class_definition = {
}
}
return json.dumps(dict(graph=getDCWorkflowGraph(context), class_definition=class_definition), indent=2)
return json.dumps(
dict(graph=getDCWorkflowGraph(context), class_definition=class_definition),
sort_keys=True,
indent=2)
......@@ -64,4 +64,7 @@ def getWorkflowGraph(workflow):
graph['node'][state_id]['coordinate'] = position_graph['node'][state_id]['coordinate']
return graph
return json.dumps(dict(graph=getWorkflowGraph(context), class_definition={}), indent=2)
return json.dumps(
dict(graph=getWorkflowGraph(context), class_definition={}),
sort_keys=True,
indent=2)
......@@ -16,7 +16,7 @@
</item>
<item>
<key> <string>height</string> </key>
<value> <int>284</int> </value>
<value> <int>277</int> </value>
</item>
<item>
<key> <string>precondition</string> </key>
......
......@@ -37,4 +37,7 @@ for i, tracking in enumerate(reversed(portal.portal_simulation.getTrackingList(a
link=movement.absolute_url(),
source=movement.getSourceUid() or "null",
destination=movement.getDestinationUid() or "null")
return json.dumps(dict(graph=graph, class_definition=class_definition), indent=2)
return json.dumps(
dict(graph=graph, class_definition=class_definition),
sort_keys=True,
indent=2)
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