Skip to content

Commit f465c42

Browse files
committed
Merge pull request #63 from d-Rickyy-b/hotfix-None
FIX: Check if result is None
2 parents 67fff52 + b426f5b commit f465c42

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

database/db_wrapper.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,11 @@ 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:
63-
return ()
60+
if result:
61+
if len(result) > 0:
62+
return result
63+
64+
return ()
6465

6566
def get_recent_players(self):
6667
one_day_in_secs = 60 * 60 * 24

0 commit comments

Comments
 (0)