Fix #15
This commit is contained in:
pare
7d7ffe3370
commit
eb2df2d0a8
S'han modificat 1 arxius amb 16 adicions i 4 eliminacions
|
@ -1044,6 +1044,8 @@ def close_game(username, checkmate):
|
|||
|
||||
row = cur.fetchone()
|
||||
|
||||
if row != None:
|
||||
|
||||
if row[0] != None:
|
||||
|
||||
white_rating = row[0]
|
||||
|
@ -1052,10 +1054,16 @@ def close_game(username, checkmate):
|
|||
|
||||
white_rating = 1500
|
||||
|
||||
else:
|
||||
|
||||
white_rating = 1500
|
||||
|
||||
cur.execute("select elo_rating from players where player_name = (%s)", (black_player,))
|
||||
|
||||
row = cur.fetchone()
|
||||
|
||||
if row != None:
|
||||
|
||||
if row[0] != None:
|
||||
|
||||
black_rating = row[0]
|
||||
|
@ -1064,6 +1072,10 @@ def close_game(username, checkmate):
|
|||
|
||||
black_rating = 1500
|
||||
|
||||
else:
|
||||
|
||||
black_rating = 1500
|
||||
|
||||
cur.close()
|
||||
|
||||
except (Exception, psycopg2.DatabaseError) as error:
|
||||
|
|
Loading…
Referencia en una nova incidència