90% сеньоров плачат на таких коммитах

This commit is contained in:
Artem Tsyrulnikov
2025-12-15 19:10:41 +03:00
parent fda91cb6d8
commit 71e5a38efc
42 changed files with 403 additions and 302 deletions

View File

@@ -24,7 +24,7 @@ async def create_placement(
if not project:
raise domain.ProjectNotFound(input.project_id)
placement_channel = await self.database.get_channel(workspace_id, channel_id=input.placement_channel_id)
placement_channel = await self.database.get_channel(channel_id=input.placement_channel_id)
if not placement_channel:
raise domain.ChannelNotFound(input.placement_channel_id)
@@ -39,6 +39,8 @@ async def create_placement(
if project.channel.telegram_id is None:
raise domain.ChannelNotFound(project.channel.id)
print(f'Телега id: {project.channel.telegram_id}')
invite_link = await self.telegram_bot.create_chat_invite_link(project.channel.telegram_id, requires_approval)
placement = domain.Placement(
@@ -71,13 +73,13 @@ async def create_placement(
placement_date=placement.placement_date,
cost=placement.cost,
comment=placement.comment,
ad_post_url=placement.ad_post_url,
ad_post_url=None,
invite_link_type=placement.invite_link_type,
invite_link=placement.invite_link,
status=placement.status,
subscriptions_count=placement.subscriptions_count,
views_count=placement.views_count,
views_availability=placement.views_availability,
last_views_fetch_at=placement.last_views_fetch_at,
views_count=None,
views_availability=domain.PostViewsAvailability.UNKNOWN,
last_views_fetch_at=None,
created_at=placement.created_at,
)