This commit is contained in:
Artem Tsyrulnikov
2026-01-18 13:35:46 +03:00
parent c304ba4ec7
commit 68e7dc4158
44 changed files with 383 additions and 387 deletions

View File

@@ -53,10 +53,10 @@ def PlacementNotFound(placement_id: uuid.UUID | None = None) -> HTTPException:
return HTTPException(status.HTTP_404_NOT_FOUND, f'Placement {placement_id} not found')
def PublicationNotFound(publication_id: uuid.UUID | None = None) -> HTTPException:
if publication_id is None:
return HTTPException(status.HTTP_404_NOT_FOUND, 'Publication not found')
return HTTPException(status.HTTP_404_NOT_FOUND, f'Publication {publication_id} not found')
def PlacementPostNotFound(placement_post_id: uuid.UUID | None = None) -> HTTPException:
if placement_post_id is None:
return HTTPException(status.HTTP_404_NOT_FOUND, 'PlacementPost not found')
return HTTPException(status.HTTP_404_NOT_FOUND, f'PlacementPost {placement_post_id} not found')
def ChannelAlreadyExists(telegram_id: int) -> HTTPException:
@@ -90,7 +90,7 @@ def CreativeMediaTooLarge(max_bytes: int) -> HTTPException:
def CreativeInUse(creative_id: uuid.UUID) -> HTTPException:
return HTTPException(
status.HTTP_400_BAD_REQUEST,
f'Creative {creative_id} is used in active publications and cannot be deleted',
f'Creative {creative_id} is used in active placement_posts and cannot be deleted',
)