Skip to content

Commit a2559ab

Browse files
committed
Fix: Cast chat_id to string before querying removed users
1 parent d4d68d3 commit a2559ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tg_bot/modules/sql/users_sql.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def migrate_chat(old_chat_id, new_chat_id):
215215

216216
def remove_user(user_id, chat_id, username):
217217
with INSERTION_LOCK:
218-
user = SESSION.query(RemovedUser).get((user_id, chat_id))
218+
user = SESSION.query(RemovedUser).get((user_id, str(chat_id)))
219219
if not user:
220220
user = RemovedUser(user_id, chat_id, username)
221221
SESSION.add(user)

0 commit comments

Comments
 (0)