Commit 1480420c authored by Jérome Perrin's avatar Jérome Perrin

make return json consistent between KE and runSimulation

{'success': True, 'data': data}
parent c75a13a9
......@@ -147,7 +147,7 @@ def runSimulation():
def _runSimulation(parameter_dict):
try:
return dict(success=getGUIInstance().run(parameter_dict))
return dict(success=True, data=getGUIInstance().run(parameter_dict))
except Exception, e:
tb = traceback.format_exc()
app.logger.error(tb)
......
......@@ -186,8 +186,8 @@
$('#result_list').empty();
$('#error').empty();
if (data['success']) {
$("#json_result").val(JSON.stringify(data['success'],
undefined, " "));
$("#json_result").val(JSON.stringify(data.data, undefined, " "));
$.each(data['success'], function (idx, obj) {
$('#result_list').append('<li class="result"></li>');
$('#result_list').children().last().text(idx + ' : ' + obj['score'] + ' ' + obj['key']).click(
......
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