diff --git a/mastochess.py b/mastochess.py index 8e90031..91710d4 100644 --- a/mastochess.py +++ b/mastochess.py @@ -1044,9 +1044,15 @@ def close_game(username, checkmate): row = cur.fetchone() - if row[0] != None: + if row != None: - white_rating = row[0] + if row[0] != None: + + white_rating = row[0] + + else: + + white_rating = 1500 else: @@ -1056,9 +1062,15 @@ def close_game(username, checkmate): row = cur.fetchone() - if row[0] != None: + if row != None: - black_rating = row[0] + if row[0] != None: + + black_rating = row[0] + + else: + + black_rating = 1500 else: