new telegram bot

This commit is contained in:
Artem Tsyrulnikov
2025-12-28 15:50:06 +03:00
parent 69179c64be
commit 2fb8c83041
75 changed files with 3719 additions and 1046 deletions

View File

@@ -34,7 +34,8 @@ async def create_placement(
if creative.project_id != project.id:
raise domain.CreativeNotFound(input.creative_id)
requires_approval = input.invite_link_type == domain.InviteLinkType.APPROVAL
# Берем тип ссылки из настроек проекта
requires_approval = project.invite_link_type == domain.InviteLinkType.APPROVAL
if project.channel.telegram_id is None:
raise domain.ChannelNotFound(project.channel.id)
@@ -49,7 +50,6 @@ async def create_placement(
placement_date=input.placement_date,
cost=input.cost,
comment=input.comment,
invite_link_type=input.invite_link_type,
invite_link=invite_link,
status=domain.PlacementStatus.ACTIVE,
)
@@ -68,7 +68,7 @@ async def create_placement(
cost=placement.cost,
comment=placement.comment,
ad_post_url=None,
invite_link_type=placement.invite_link_type,
invite_link_type=project.invite_link_type,
invite_link=placement.invite_link,
status=placement.status,
subscriptions_count=0,