refactor
This commit is contained in:
@@ -383,7 +383,14 @@ class Postgres(DatabaseBase):
|
||||
query = domain.Placement.filter(project__workspace_id=workspace_id, project_id=project_id)
|
||||
|
||||
if not include_archived:
|
||||
query = query.filter(status__in=[domain.PlacementStatus.APPROVED, domain.PlacementStatus.IN_PROGRESS])
|
||||
query = query.filter(
|
||||
status__in=[
|
||||
domain.PlacementStatus.PLANNED,
|
||||
domain.PlacementStatus.APPROVED,
|
||||
domain.PlacementStatus.IN_PROGRESS,
|
||||
domain.PlacementStatus.COMPLETED,
|
||||
]
|
||||
)
|
||||
|
||||
return (
|
||||
await query.prefetch_related('project', 'project__channel', 'channel', 'creative')
|
||||
|
||||
Reference in New Issue
Block a user