add fix for chat checker

This commit is contained in:
harold 2025-06-16 17:49:30 +05:00
parent 7e1889ef6d
commit d46efe25dc
2 changed files with 3 additions and 3 deletions

View File

@ -52,14 +52,14 @@ async def check_chat_exists(
) -> None: ) -> None:
chat = await redis_client.get(name=str(chat_id)) chat = await redis_client.get(name=str(chat_id))
# if chat: if chat:
# return return
async with db_helper.get_async_session_not_closed() as session: async with db_helper.get_async_session_not_closed() as session:
chat = await session.get(TgChat, chat_id) chat = await session.get(TgChat, chat_id)
if not chat: if not chat:
await tg_crud.create_new_chat( chat = await tg_crud.create_new_chat(
session=session, session=session,
id=chat_id, id=chat_id,
chat_type=chat_type, chat_type=chat_type,