from utils.exceptions import BadRequest, ValidationError, Forbidden class ProjectError(BadRequest): pass class CampaignTypeError(BadRequest): """Raised in attempt to assign invalid type to an campaign.""" pass class PhaseStartDateError(BadRequest): pass class ProjectScheduleError(ValidationError): def __init__(self): self.message = "End date must be greater or equal to the start date" super().__init__(self.message) class ProjectEndDateError(ValidationError): def __init__(self): self.message = "End date must be greater or equal to the latest campaign end date" class ProjectPRSArtistsError(Forbidden): detail = "You can't remove artists added by PRS" class EndDateValidationError(BadRequest): detail = "Invalid project schedule."