Spaces:
Paused
Paused
Captain Ezio
commited on
Commit
·
31d949b
1
Parent(s):
9b5da99
...
Browse files
Powers/database/approve_db.py
CHANGED
|
@@ -34,8 +34,12 @@ class Approve(MongoDB):
|
|
| 34 |
def remove_approve(self, user_id: int):
|
| 35 |
with INSERTION_LOCK:
|
| 36 |
if self.check_approve(user_id):
|
| 37 |
-
|
| 38 |
-
self.chat_info["users"]
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
return self.update(
|
| 40 |
{"_id": self.chat_id},
|
| 41 |
{"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 |
+
inde = 0
|
| 38 |
+
for index, user in enumerate(self.chat_info["users"]):
|
| 39 |
+
if user[0] == user_id:
|
| 40 |
+
inde = index
|
| 41 |
+
break
|
| 42 |
+
self.chat_info["users"].pop(inde)
|
| 43 |
return self.update(
|
| 44 |
{"_id": self.chat_id},
|
| 45 |
{"users": self.chat_info["users"]},
|