feat: убираем денормализацию (антипреждевременная оптимизация)
This commit is contained in:
@@ -44,6 +44,8 @@ async def update_placement(
|
||||
if placement.post:
|
||||
ad_post_url = generate_post_url(placement.post.channel.username, placement.post.message_id)
|
||||
|
||||
subscriptions_count = await self.database.count_subscriptions_by_placement(placement.id)
|
||||
|
||||
return dto.PlacementOutput(
|
||||
id=placement.id,
|
||||
project_id=placement.project_id,
|
||||
@@ -59,6 +61,6 @@ async def update_placement(
|
||||
invite_link_type=placement.invite_link_type,
|
||||
invite_link=placement.invite_link,
|
||||
status=placement.status,
|
||||
subscriptions_count=placement.subscriptions_count,
|
||||
subscriptions_count=subscriptions_count,
|
||||
created_at=placement.created_at,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user