Add default ip address

This commit is contained in:
Denis-Cosmin Nutiu 2017-08-24 18:55:09 +03:00
parent 5d4c88cc95
commit 6dc2d43222

View file

@ -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!")