Skip to content

Commit

Permalink
Fixed adding invalid values
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmatu committed Mar 6, 2022
1 parent 14544f5 commit 7c3d8bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scores.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def add_score():
db.session.commit()

def check_valid_score():
if float(request.form["addaverage"]) > 180:
if float(request.form["addaverage"]) > 180 or (float(request.form["addaverage"]) > int(request.form["addhighest"])):
return False
if int(request.form["addtons"]) > 5 or (int(request.form["addtons"]) > 0 and int(request.form["addhighest"]) < 100):
return False
Expand Down

0 comments on commit 7c3d8bc

Please sign in to comment.