From 28a69b350ddec4d781cf0543b681a776ce955c1f Mon Sep 17 00:00:00 2001 From: Artem Tsyrulnikov Date: Thu, 19 Feb 2026 11:34:23 +0300 Subject: [PATCH] =?UTF-8?q?fix=20=D0=BF=D1=80=D0=B8=D0=B3=D0=BB=D0=B0?= =?UTF-8?q?=D1=81=D0=B8=D1=82=D0=B5=D0=BB=D1=8C=D0=BD=D1=8B=D1=85=20=D1=81?= =?UTF-8?q?=D1=81=D1=8B=D0=BB=D0=BE=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/usecase/purchase/create_placements.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/usecase/purchase/create_placements.py b/src/usecase/purchase/create_placements.py index 5430473..5b86ebf 100644 --- a/src/usecase/purchase/create_placements.py +++ b/src/usecase/purchase/create_placements.py @@ -188,9 +188,8 @@ async def create_placements( channel_details = channel_input.details creative_id = ( - (channel_details.creative_id if channel_details and channel_details.creative_id else None) - or input.creative_id - ) + channel_details.creative_id if channel_details and channel_details.creative_id else None + ) or input.creative_id # Если creative_id передан, ищем и валидируем креатив creative: domain.Creative | None = None @@ -208,14 +207,11 @@ async def create_placements( channel_id=channel.id, invite_link=None, invite_link_type=( - channel_details.invite_link_type - if channel_details and channel_details.invite_link_type - else None + channel_details.invite_link_type if channel_details and channel_details.invite_link_type else None ) or project.purchase_invite_type_default, status=channel_input.status or domain.PlacementStatus.NO_STATUS, - comment=channel_input.comment - or (channel_details.comment if channel_details else None), + comment=channel_input.comment or (channel_details.comment if channel_details else None), placement_at=channel_details.placement_at if channel_details else None, payment_at=channel_details.payment_at if channel_details else None, cost_type=channel_details.cost.type if channel_details and channel_details.cost else None, @@ -239,7 +235,7 @@ async def create_placements( # Generate invite_link_name after placement has UUID short_id = uuid_to_short_id(placement.id) - placement.invite_link_name = generate_invite_link_name(short_id, project.channel.title) + placement.invite_link_name = generate_invite_link_name(short_id, channel.title) await self.database.update_placement(placement) placements.append(placement)