refactor
This commit is contained in:
@@ -46,7 +46,7 @@ async def get_spending_analytics(
|
||||
context.ensure_project_permission(domain.PermissionKey.ANALYTICS_READ, project.id)
|
||||
allowed_project_ids = None
|
||||
|
||||
placements = await self.database.get_workspace_placements(
|
||||
placements = await self.database.get_workspace_publications(
|
||||
input.workspace_id,
|
||||
input.project_id,
|
||||
include_archived=False,
|
||||
@@ -76,7 +76,7 @@ async def get_spending_analytics(
|
||||
|
||||
# Batch fetch subscriptions counts
|
||||
placement_ids = [p.id for p in filtered]
|
||||
subscriptions_counts = await self.database.count_subscriptions_by_placement_batch(placement_ids)
|
||||
subscriptions_counts = await self.database.count_subscriptions_by_publication_batch(placement_ids)
|
||||
|
||||
# Группировка по периодам
|
||||
period_data: dict[str, PeriodData] = defaultdict(PeriodData)
|
||||
|
||||
Reference in New Issue
Block a user