Skip to content

Commit ed3269a

Browse files
authored
Simplified
1 parent 000f277 commit ed3269a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

database/database.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@
1717

1818
async def present_user(user_id : int):
1919
found = user_data.find_one({'_id': user_id})
20-
if found:
21-
return True
22-
else:
23-
return False
20+
return bool(found)
2421

2522
async def add_user(user_id: int):
2623
user_data.insert_one({'_id': user_id})
@@ -36,4 +33,4 @@ async def full_userbase():
3633

3734
async def del_user(user_id: int):
3835
user_data.delete_one({'_id': user_id})
39-
return
36+
return

0 commit comments

Comments
 (0)