new telegram bot
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user