refactor
This commit is contained in:
@@ -33,7 +33,7 @@ async def get_creatives_analytics(
|
||||
include_archived=False,
|
||||
allowed_project_ids=allowed_project_ids,
|
||||
)
|
||||
placements = await self.database.get_workspace_placements(
|
||||
placements = await self.database.get_workspace_publications(
|
||||
input.workspace_id,
|
||||
input.project_id,
|
||||
include_archived=False,
|
||||
@@ -55,7 +55,7 @@ async def get_creatives_analytics(
|
||||
|
||||
# Batch fetch subscriptions counts
|
||||
placement_ids = [p.id for p in placements]
|
||||
subscriptions_counts = await self.database.count_subscriptions_by_placement_batch(placement_ids)
|
||||
subscriptions_counts = await self.database.count_subscriptions_by_publication_batch(placement_ids)
|
||||
|
||||
for p in placements:
|
||||
stats = creative_stats.get(p.creative_id)
|
||||
|
||||
Reference in New Issue
Block a user