Skip to content

Commit 839ea25

Browse files
committed
FIX: Check if result is None
1 parent 67fff52 commit 839ea25

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

database/db_wrapper.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,10 @@ def get_user(self, user_id: int) -> tuple:
5757
self.cursor.execute("SELECT * FROM users WHERE userID=?;", [str(user_id)])
5858

5959
result = self.cursor.fetchone()
60-
if len(result) > 0:
61-
return result
62-
else:
60+
if result:
61+
if len(result) > 0:
62+
return result
63+
else:
6364
return ()
6465

6566
def get_recent_players(self):

0 commit comments

Comments
 (0)