Captain Ezio commited on
Commit
63fbdab
·
1 Parent(s): e1723cc

Update approve_db.py

Browse files
Files changed (1) hide show
  1. Powers/database/approve_db.py +8 -1
Powers/database/approve_db.py CHANGED
@@ -19,7 +19,14 @@ class Approve(MongoDB):
19
 
20
  def check_approve(self, user_id: int):
21
  with INSERTION_LOCK:
22
- return bool(user_id in i for i in self.chat_info["users"])
 
 
 
 
 
 
 
23
 
24
  def add_approve(self, user_id: int, user_name: str):
25
  with INSERTION_LOCK:
 
19
 
20
  def check_approve(self, user_id: int):
21
  with INSERTION_LOCK:
22
+ j = False
23
+ if not self.chat_info["users"]:
24
+ return j
25
+ for i in self.chat_info["users"]:
26
+ if user_id in i:
27
+ j = True
28
+ break
29
+ return j
30
 
31
  def add_approve(self, user_id: int, user_name: str):
32
  with INSERTION_LOCK: