From 66a664770f46d7ccfb555b7b0fc8d61e63d5e2f6 Mon Sep 17 00:00:00 2001 From: Alexey Kudelko <110509023+sh1nkey@users.noreply.github.com> Date: Fri, 28 Jun 2024 18:32:29 +0300 Subject: [PATCH] Update services.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit в паре мест поправил return --- src/websocket/services.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/websocket/services.py b/src/websocket/services.py index c6bf392..7036612 100644 --- a/src/websocket/services.py +++ b/src/websocket/services.py @@ -140,8 +140,6 @@ async def get_user_active_direct_chats(db_session: AsyncSession, *, current_user for direct_chat in direct_chats: direct_chats_dict[str(direct_chat.guid)] = direct_chat.id return direct_chats_dict - else: - return None async def get_chat_id_by_guid(db_session: AsyncSession, *, chat_guid: UUID) -> int | None: @@ -149,9 +147,6 @@ async def get_chat_id_by_guid(db_session: AsyncSession, *, chat_guid: UUID) -> i result = await db_session.execute(query) chat_id: int | None = result.scalar_one_or_none() - if not chat_id: - return None - return chat_id