feat: доменный нейминг изменен
This commit is contained in:
@@ -16,8 +16,8 @@ async def delete_creative(self: 'Usecase', input: dto.DeleteCreativeInput) -> No
|
||||
log.warning('User %s attempted to delete unavailable creative %s', input.user_id, input.creative_id)
|
||||
raise domain.CreativeNotFound(input.creative_id)
|
||||
|
||||
if creative.purchases_count > 0:
|
||||
log.warning('Creative %s is used in purchases and cannot be deleted', input.creative_id)
|
||||
if creative.placements_count > 0:
|
||||
log.warning('Creative %s is used in placements and cannot be deleted', input.creative_id)
|
||||
raise domain.CreativeInUse(input.creative_id)
|
||||
|
||||
await self.database.delete_creative(input.creative_id)
|
||||
|
||||
Reference in New Issue
Block a user