mirror of
https://github.com/FAUSheppy/open-web-leaderboard.git
synced 2025-12-07 23:51:36 +01:00
correctly handle player not found case in db
This commit is contained in:
@@ -41,7 +41,7 @@ def findPlayerByName(database, playerName):
|
|||||||
row = cursor.fetchone()
|
row = cursor.fetchone()
|
||||||
|
|
||||||
playerRow = None
|
playerRow = None
|
||||||
if row:
|
if not playerRow:
|
||||||
cursor.execute("SELECT * FROM players WHERE name LIKE ?", (playerNamePrepared,))
|
cursor.execute("SELECT * FROM players WHERE name LIKE ?", (playerNamePrepared,))
|
||||||
playerRow = cursor.fetchone()
|
playerRow = cursor.fetchone()
|
||||||
if not playerRow:
|
if not playerRow:
|
||||||
|
|||||||
Reference in New Issue
Block a user