fix session
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Pavel_Duron 2022-12-03 17:22:43 +10:00
parent 3dd2b32086
commit 5c7935e430

1
bot.py
View File

@ -114,6 +114,7 @@ chat_id = message.chat.id)
async def send_topchat(message: types.Message): async def send_topchat(message: types.Message):
changechat_id = session.query(user).filter(user.user_id == message.from_user.id).first() changechat_id = session.query(user).filter(user.user_id == message.from_user.id).first()
chats = message.chat.id chats = message.chat.id
if changechat_id.chat_id != chats:
changechat_id.chat_id = chats changechat_id.chat_id = chats
session.commit() session.commit()
session.close() session.close()