From 6dc2d432227618375532fa208801f5b1bff2fa88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Nut=CC=A6iu?= Date: Thu, 24 Aug 2017 18:55:09 +0300 Subject: [PATCH] Add default ip address --- src/views/scoreboard.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/views/scoreboard.py b/src/views/scoreboard.py index 9af629c..d9609b9 100644 --- a/src/views/scoreboard.py +++ b/src/views/scoreboard.py @@ -54,6 +54,9 @@ def result_post(): score = int(content['score']) ip = flask.request.remote_addr + if ip == '': + ip = '0.0.0.0' + # Extra validators if score <= 0: raise ValueError("Score must be positive!")