Spaces:
Paused
Paused
Captain Ezio
commited on
Commit
·
9b5da99
1
Parent(s):
f8b491f
....
Browse files
Powers/database/approve_db.py
CHANGED
|
@@ -34,10 +34,8 @@ class Approve(MongoDB):
|
|
| 34 |
def remove_approve(self, user_id: int):
|
| 35 |
with INSERTION_LOCK:
|
| 36 |
if self.check_approve(user_id):
|
| 37 |
-
user_full =
|
| 38 |
-
|
| 39 |
-
)
|
| 40 |
-
self.chat_info["users"].pop(user_full)
|
| 41 |
return self.update(
|
| 42 |
{"_id": self.chat_id},
|
| 43 |
{"users": self.chat_info["users"]},
|
|
|
|
| 34 |
def remove_approve(self, user_id: int):
|
| 35 |
with INSERTION_LOCK:
|
| 36 |
if self.check_approve(user_id):
|
| 37 |
+
user_full = (user for user in self.chat_info["users"] if user[0] == user_id)
|
| 38 |
+
self.chat_info["users"].remove(user_full)
|
|
|
|
|
|
|
| 39 |
return self.update(
|
| 40 |
{"_id": self.chat_id},
|
| 41 |
{"users": self.chat_info["users"]},
|