Add default ip address
This commit is contained in:
parent
5d4c88cc95
commit
6dc2d43222
1 changed files with 3 additions and 0 deletions
|
@ -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!")
|
||||
|
|
Loading…
Reference in a new issue