summaryrefslogtreecommitdiff
path: root/kpov_judge/web
diff options
context:
space:
mode:
Diffstat (limited to 'kpov_judge/web')
-rwxr-xr-xkpov_judge/web/kpov_judge/kpov_judge.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/kpov_judge/web/kpov_judge/kpov_judge.py b/kpov_judge/web/kpov_judge/kpov_judge.py
index 21233f4..1bd42c5 100755
--- a/kpov_judge/web/kpov_judge/kpov_judge.py
+++ b/kpov_judge/web/kpov_judge/kpov_judge.py
@@ -77,7 +77,7 @@ def results_post(task_id, results):
except Exception as e:
hints = ["Checker died: " + str(e)]
res = 0
- if isinstance(res, int) and res > 0:
+ if (isinstance(res, int) or isinstance(res, float)) and res > 0:
res_status = 'OK'
else:
res_status = 'NOT OK'
@@ -101,7 +101,8 @@ def results_dict(task_id):
@app.route('/tasks/<task_id>/results.json', methods=['GET', 'POST'])
def results_json(task_id):
if flask.app.request.method == 'POST':
- return json.dumps(results_post(task_id, json.loads(flask.app.request.form['results'])))
+ return json.dumps(results_post(task_id,
+ json.loads(flask.app.request.form['results'])))
return json.dumps(results_dict(task_id))
@app.route('/tasks/<task_id>/<lang>/setup.<ending>', methods=['GET'])