correctly handle player not found case in db

This commit is contained in:
2020-06-17 17:13:15 +02:00
parent dcaf446887
commit 35d99de83c

View File

@@ -41,7 +41,7 @@ def findPlayerByName(database, playerName):
row = cursor.fetchone()
playerRow = None
if row:
if not playerRow:
cursor.execute("SELECT * FROM players WHERE name LIKE ?", (playerNamePrepared,))
playerRow = cursor.fetchone()
if not playerRow: