From eb2df2d0a8ceb31cc9822a0faca34529f9ce1775 Mon Sep 17 00:00:00 2001 From: spla Date: Fri, 1 Jan 2021 18:59:21 +0100 Subject: [PATCH] Fix #15 --- mastochess.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) 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: