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

7
bot.py
View File

@ -114,9 +114,10 @@ chat_id = message.chat.id)
async def send_topchat(message: types.Message):
changechat_id = session.query(user).filter(user.user_id == message.from_user.id).first()
chats = message.chat.id
changechat_id.chat_id = chats
session.commit()
session.close()
if changechat_id.chat_id != chats:
changechat_id.chat_id = chats
session.commit()
session.close()
top = session.query(user.user_fullname, user.dick_size).order_by(user.dick_size.desc()).filter(user.chat_id == chats).limit(10).all()
delimiter = ': '