diff options
author | gasperfele@fri1.uni-lj.si <gasperfele@fri1.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414> | 2016-12-29 23:43:31 +0000 |
---|---|---|
committer | gasperfele@fri1.uni-lj.si <gasperfele@fri1.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414> | 2016-12-29 23:43:31 +0000 |
commit | e11077772bf32f25613f4f559feee8c963ea5dda (patch) | |
tree | e770210a5e750cf323c77ffc928bdc35115feb14 /kpov_judge/web | |
parent | 110ab9c64c408dce2345f134989f5d15bcce42ae (diff) |
Fixes to multiple tasks
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@377 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
Diffstat (limited to 'kpov_judge/web')
-rwxr-xr-x | kpov_judge/web/kpov_judge/kpov_judge.py | 5 |
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']) |