From 768d9d8849bc65644c89b960f7bd2991cd3ad1e4 Mon Sep 17 00:00:00 2001 From: dev1lfreak Date: Thu, 25 Jun 2026 22:57:16 +0300 Subject: [PATCH] fix: change docs upload template and handler --- src/infrastructure/telegram/templates/docs_notify.txt | 3 +-- src/presentation/messaging/consumers.py | 7 +++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/infrastructure/telegram/templates/docs_notify.txt b/src/infrastructure/telegram/templates/docs_notify.txt index a92a950..89b7158 100644 --- a/src/infrastructure/telegram/templates/docs_notify.txt +++ b/src/infrastructure/telegram/templates/docs_notify.txt @@ -1,3 +1,2 @@ #docs -Клиент с ID: {{id_client}} -Отправил документы на проверку \ No newline at end of file +Клиент юр. лицо. отправил документы на проверку \ No newline at end of file diff --git a/src/presentation/messaging/consumers.py b/src/presentation/messaging/consumers.py index 6bca8d9..158c21c 100644 --- a/src/presentation/messaging/consumers.py +++ b/src/presentation/messaging/consumers.py @@ -22,8 +22,8 @@ class Metadata(BaseModel): class Payload(BaseModel): - id_client: str - usdt_amount: Optional[Decimal] = None + id_client: Optional[str] = None + rub_amount: Optional[Decimal] = None class NotifyCreated(BaseModel): @@ -47,7 +47,7 @@ async def consume_notify( logger.info( f"received event={msg_body.event} " - f"id_client={msg_body.payload.id_client} " + f"id_client={msg_body.payload.id_client if msg_body.payload.id_client else 'New Client'} " f"trace_id={trace_id}" ) @@ -61,7 +61,6 @@ async def consume_notify( elif msg_body.event == 'docs_upload': text = renderer.render( 'docs_notify.txt', - id_client=msg_body.payload.id_client, trace_id=trace_id )