From 7a4ee367ce321171eb8b8267bad377bd2559b2d3 Mon Sep 17 00:00:00 2001 From: Kento HASEGAWA Date: Thu, 23 Aug 2018 09:24:48 +0900 Subject: [PATCH] Fix a bug: saving the best answer (#16) --- comm/server/main.py | 2 +- comm/server/static/js/pynq-manager.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/comm/server/main.py b/comm/server/main.py index 4caed05..c975765 100644 --- a/comm/server/main.py +++ b/comm/server/main.py @@ -360,7 +360,7 @@ def save_best_solution(): with open(out_file_path, 'w') as fp: fp.write(questions[qname]['answers'][_best_json]['answer']) - questions[_name]["status"] = "Saved" + questions[qname]["status"] = "Saved" questions[qname]['best_json'] = _best_json res = {"status": "OK"} diff --git a/comm/server/static/js/pynq-manager.js b/comm/server/static/js/pynq-manager.js index 8361e2a..534a61f 100644 --- a/comm/server/static/js/pynq-manager.js +++ b/comm/server/static/js/pynq-manager.js @@ -209,6 +209,7 @@ $(function(){ data: {qname: qname} }).done((data) => { alert(data['status']); + location.reload(); }); }); $("#client-control-pane").find(".submit-button").eq(0).click(function(){ -- 2.22.0